View Single Post
  #6 (permalink)  
Old March 30th, 2005, 09:18 PM
richard.york's Avatar
richard.york richard.york is offline
Wrox Author
Points: 5,506, Level: 31
Points: 5,506, Level: 31 Points: 5,506, Level: 31 Points: 5,506, Level: 31
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Jun 2003
Location: Camby, IN, USA.
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts

Ok, makes a little more sense now that I'm actually looking at the example in both browsers. So I'll try to explain again, disregard my last explaination.

In IE you're seeing a bug, which I did talk about in my book, and that bug is it's width property behaves more like the min-width property, it is stretching the <html> and <body> elements to accomodate the <p> element.

In Firefox, I was baffled at first by the lack of a right margin.
With the example you provide here Firefox and Opera agree, at first, then things take a twist when the following modifications are made.

html, body{
    border: thin solid red;
    margin: 20px;
    padding: 0;

I've looked at the example in Firefox, Opera and MSIE and now have three different results. Of the three I beleive that Opera is correct, but without consulting the specifications I'm not yet certain of that. That zero padding is added because Opera adds default padding instead of margin on the <body> element.

I also beleive that it is possible that this has something to do with how browsers handle overflowing content, it isn't ignoring the margin on that side, but rather it is off screen lost in the abyss.

I will look into this further and report back with my findings.


Mail_IMAP: A PHP/C-Client/PEAR solution for webmail
Author: Beginning CSS: Cascading Style Sheets For Web Design