html - Vertical positioning of inline-blocks -


this question kind of hard explain words, link jsfiddle. jsfiddle. if @ of links, see boxes @ different levels. these supposed tile across screen, kind of can see here. how can stop them having weird vertical spacing above elements , them tile properly? think caused each elements contents having different heights, don't know how fix it. here code can find in jsfiddle:
html:

<div id="elements">     <div>lorem ipsum dolor sit amet, consectetur adipiscing elit. donec id nunc ut erat facilisis pharetra. sed egestas gravida mattis.</div>     <div>lorem ipsum dolor sit amet, consectetur adipiscing elit. nullam eu lectus eu purus pulvinar tincidunt. phasellus @ elit id nulla volutpat gravida sit amet vitae lorem. nunc mattis venenatis varius. aenean nec odio lorem. nulla in turpis sed velit venenatis lacinia eget id ante. maecenas quis massa nunc.</div>     <div>lorem ipsum dolor sit amet, consectetur adipiscing elit. </div> </div> 

css:

#elements div {     display:inline-block;     width:250px;     height:250px;     border:solid thin #000; } 

add vertical-align: top; css rule.


Comments

Popular posts from this blog

ios - iPhone/iPad different view orientations in different views , and apple approval process -

php - HTTP_REFERER woes: How can I allow access to a specific page, only when a visitor has visited another specific page beforehand? -

java Extracting Zip file -