Take a look at this fiddle:
http://jsfiddle.net/WTcgt/
Why is the BOX1 pushed down by the amount of border of BOX2? Is this a bug?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The box-sizing property is supported in Internet Explorer, Opera, and Chrome.
Firefox supports an alternative, the
-moz-box-sizingproperty.Safari supports an alternative, the
-webkit-box-sizingproperty.here is working example http://jsfiddle.net/WTcgt/2/
This is the behavior of inline-block:
use
vertical-align:topto avoid this problem. If we doesn’t use vertical-align property then elements align in same line based on adjacent element. For more information read http://www.impressivewebs.com/inline-block/ and http://www.brunildo.org/test/inline-block.html