Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
PIMORN SENAKAT
4,735 PointsCould you explain why these 2 divs are not align?
I have created 2 inline-block divs side-by-side. But it's not align top if one div contain divs.
This is the example http://codepen.io/anon/pen/KwJBNP
2 Answers

Colin Bell
29,679 PointsAdd the vertical-align property with a "top" value to your inline-block elements:
.image {
width: 400px;
height: 400px;
display: inline-block;
background: firebrick;
vertical-align: top;
}
.content {
width: 400px;
height: 400px;
display: inline-block;
background: lightblue;
vertical-align: top;
}

PIMORN SENAKAT
4,735 PointsThanks Colin. it works like magic!