Jump to content

Not understanding box model...


DarkxPunk

Recommended Posts

Hey everyone so I have two pictures Box model ideal:post-88442-0-31199700-1358711278_thumb.jpgBox model real:post-88442-0-02845100-1358711290_thumb.jpgAs far as I understand box model the ideal should happen, but the real happens... Why? Anyway around it? BLAH! I know you can use padding, but it does not make sense -_- Thanks for any help. -EDIT- Gotta set the wrapper to overflow anything other than visible. Still silly. Stupid collapsing.

Edited by DarkxPunk
Link to comment
Share on other sites

It's called collapsing margins. vertical margin of an element will be applied to the ancestor. The easiest way to solve it is to add overflow: hidden to the container.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...