html - The text in my paragraph tags isn't vertically aligned like it should be -
i used line-height property inner text of div vertically aligned:
div.header { background-color: #00325f; height: 50px; padding: 0px; min-width: 880px; line-height: 25px; } hence, 00011101010000110101010 following should in middle of div in resides.
<div class="header"> <p>00011101010000110101010</p> </div> but when preview page, it's @ top of div usual. can me resolve issue , explain html logic behind issue?
your line-height should 50px not 25px vertically center text.
div.header { background-color: #00325f; height: 50px; padding: 0px; min-width: 880px; line-height: 50px; } the line-height should same height container itself.
here fiddle: http://jsfiddle.net/7ezge/
Comments
Post a Comment