html - Strange behavior while using display inline-block ...why? -


html

<div class="menu">     <p>normal</p> </div> <div class="menu">     <p>normal</p> </div> <div class="menu">     <p>normal</p> </div> <div class="menu">     <p>why div stays @ top</p> </div> 

css

.menu{     width:120px;     background-color:red;     display:inline-block;     height:400px; } 

http://jsfiddle.net/jezvt/

i have 4 divs aligned next each other using inline-block. when enter text inside div using p tag, div 2 lines stays @ top while other 3 divs(has 1 line text) aligned properly.

help please..

add code vertical-align:top; demo


Comments

Popular posts from this blog

google api - Incomplete response from Gmail API threads.list -

Installing Android SQLite Asset Helper -

Qt Creator - Searching files with Locator including folder -