Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Margins in Firefox?


Guest

Recommended Posts

Posted

Hi

I have a problem when viewing in Firefox. There is some margin errors that adds to all boxes. So I end up with the right column outside the page?

 

Take a look at Rounders

 

Any advice would be appreciated.

Posted

Actually Firefox is rendering the margins correctly. According to the W3C standards, margins and padding should be added to the *outside* width of an element. So (for example) a <div> of width 200px with a margin of 10px will be 220px wide (10 + 200 + 10)

 

IE goes off and does it's own thing - and adds the margins/padding etc to the *inside* of an element. This is actually incorrect - a <div> with padding of 10px in IE will actually have a container width of 180px - not the 200px it's been set at.

Archived

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

×
×
  • Create New...