html - How do I center the text in my div? -


this question has answer here:

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

Popular posts from this blog

php - Admin SDK -- get information about the group -

dns - How To Use Custom Nameserver On Free Cloudflare? -

Python Error - TypeError: input expected at most 1 arguments, got 3 -