html - How do I center the text in my div? -
this question has answer here:
- how vertically center text css? 31 answers
how the texts in div id="tools" centered evenly spaced in div created nav bar?
here css , html second
#learn { display: inline; background-color: white; font-size: 1.1em; } #sign { display: inline; background-color: white; font-size: 1.1em; } #find { display: inline; background-color: white; font-size: 1.1em; } #about { display: inline; background-color: white; font-size: 1.1em; } .toolnav { height: 50px; width: 1000px; background-color: white; border: 2px deepskyblue solid; border-radius: 15px; margin: auto; line-height: 50px; text-align:center; }
<div class="toolnav"> <div id="learn">learn more</div> <div id="sign">sign up</div> <div id="find">find task</div> <div id="about">about yanoe</div> </div>
try add css
.toolnav { text-align:center; }
this make text position in center.
Comments
Post a Comment