W3C home > Mailing lists > Public > www-style@w3.org > February 2005

Re: XHTML as XML

From: Ryan Cannon <ryan@ryancannon.com>
Date: Fri, 11 Feb 2005 10:28:49 -0500
Message-ID: <420CCF31.2070300@ryancannon.com>
To: Anne van Kesteren <fora@annevankesteren.nl>
CC: www-style@w3.org
Anne van Kesteren wrote:

>
> Ryan Cannon wrote:
>
>>
>>>> I think the real problem is that the default stylesheet for the 
>>>> Mozilla-based browsers includes unnecessary whitespace--which you can
>>>> easily work around.
>>>
>>>
>>> ?
>>
>>
>> When first converting my stylesheets to work or 
>> application/xhtml+xml, the first thing I noticed was a white band 
>> around the page--it seems Mozilla has a default margin on the body 
>> element (which I see as odd, even in text/html: if body==viewport, a 
>> margin would be worthless; you would theoretically need to use padding).
>
>
> The BODY is just another element. It is not special or anything. 
> Mozilla's UA style sheet is the same for HTML and XHTML.
>
>
Not precisely. When the document is served as text/html and there is no 
styling for the html element, the body element magically controls the 
viewport background. This behavior changes when styling (at least 
background-color) is added to the html element. The behavior is similar 
in Opera and IE5/Mac (although it cannot handle application/xhtml+xml), 
although Opera does not add the margin to the body element. 
Interestingly, Safari does not treat BODY as just another element even 
when served as application/xhtml+xml. I am not sure how this does or 
does not relate to specifications.

http://www.ryancannon.com/lib/html/mime.php

-- 

Ryan Cannon
Instructional Technology
Web Design
RyanCannon.com <http://ryancannon.com/?refer=email>
(989) 463-7060
Received on Friday, 11 February 2005 15:28:53 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:35 GMT