Jump to content

Div margins overlapping?


Dilated

Recommended Posts

I've googled this and couldn't find anything. I'll try to explain my problem in an example:Stylesheet would look like this:

   div { margin: 5px auto 5px auto; }   table { margin: 5px auto 5px auto; }

And the page's body would look like this:

   <div>stuff here</div>   <table><tr><td>other stuff here</td></tr></table>   <div>another div here</div>   <div>and another div here</div>

What I've noticed is that div margins seem to overlap. The space between the last 2 divs will be 5 pixels, and the space between one of the divs and the table will be 10px.What is the reason for this inconsistency? BTW, I've only seen this happen with firefox so far, I haven't tried any other browser.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...