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

Popular posts from this blog

javascript - jquery or ashx not working -

opencv - DataType<cv::detail::deriv_type>::depth what is it used for -

python 3.x - Mapping specific letters onto a list of words -