css - How can I center the block of text without the next line being centered relative to the top line? -
i need center text. used text-align center next line gets centered. need aligned line on top.
<div class="box"> <div class="text">some text.some text.some text.some text.some text.some text.some text. text.some text.some text.some text.some text.</div> </div>
how can center block of text without next line being centered relative top line?
one cheap way wrap text inside element you've did, nearest width, text ends perfect instead of wrapping other line leaving large space on right, , use margin: auto;
.text { width: 490px; margin: 0 auto; }
Comments
Post a Comment