473,499 Members | 1,774 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Body shorter in Mozilla when XML

http://www.opro.org/index.php

CSS in question at http://www.opro.org/default.css and
http://www.opro.org/imported.css

This is a PHP experiment served as application/xhtml+xml when possible.
The document is otherwise identical to http://www.opro.org/index.html
which is served as text/html.

Issue: In Mozilla 1.6, on the .php (xml+xhtml) page the body element does
not extend to the bottom of the viewport - note the background color. In
the .html (text/html) version, it does.

Stumped.
Jul 20 '05 #1
5 2010
Neal wrote:
Issue: In Mozilla 1.6, on the .php (xml+xhtml) page the body element
does not extend to the bottom of the viewport - note the background
color. In the .html (text/html) version, it does.

Stumped.


<http://www.w3.org/TR/REC-CSS2/colors.html#q2>:

The background of the box generated by the root element covers the
entire canvas.

For HTML documents, however, we recommend that authors specify the
background for the BODY element rather than the HTML element. User
agents should observe the following precedence rules to fill in the
background: if the value of the 'background' property for the HTML
element is different from 'transparent' then use it, else use the
value of the 'background' property for the BODY element. If the
resulting value is 'transparent', the rendering is undefined.
--
Johannes Koch
In te domine speravi; non confundar in aeternum.
(Te Deum, 4th cent.)
Jul 20 '05 #2
Neal wrote:
http://www.opro.org/index.php

CSS in question at http://www.opro.org/default.css and
http://www.opro.org/imported.css

This is a PHP experiment served as application/xhtml+xml when possible.
The document is otherwise identical to http://www.opro.org/index.html
which is served as text/html.

Issue: In Mozilla 1.6, on the .php (xml+xhtml) page the body element
does not extend to the bottom of the viewport - note the background
color. In the .html (text/html) version, it does.


Apply the background colour to the html element in your style sheet.

Oh, and see http://tranchant.plus.com/notes/multiviews

--
Mark.
Jul 20 '05 #3
On Tue, 25 May 2004 14:20:11 +0100, Mark Tranchant
<ma**@tranchant.plus.com> wrote:
Neal wrote:
http://www.opro.org/index.php

CSS in question at http://www.opro.org/default.css and
http://www.opro.org/imported.css

This is a PHP experiment served as application/xhtml+xml when possible.
The document is otherwise identical to http://www.opro.org/index.html
which is served as text/html.

Issue: In Mozilla 1.6, on the .php (xml+xhtml) page the body element
does not extend to the bottom of the viewport - note the background
color. In the .html (text/html) version, it does.
Apply the background colour to the html element in your style sheet.


Fixed. Very odd this only happens when served as XHTML...
Oh, and see http://tranchant.plus.com/notes/multiviews


Unfortunately, my host runs PHP 4.0.6... well, this experiment is in an
extremely early stage. Eventually, as I figure PHP out, I'd like the whole
site in PHP.

Jul 20 '05 #4
Neal wrote:
Apply the background colour to the html element in your style sheet.


Fixed. Very odd this only happens when served as XHTML...


It's in the specs, IIRC. You can specify the background for both
elements without problem, and the declaration will give the desired
effect for both types:

html, body { background-color: #123456; }
Oh, and see http://tranchant.plus.com/notes/multiviews


Unfortunately, my host runs PHP 4.0.6... well, this experiment is in an
extremely early stage. Eventually, as I figure PHP out, I'd like the
whole site in PHP.


I suspect that 4.0.6 will exhibit the same characteristics, although you
need to use $HTTP_SERVER_VARS instead of $_SERVER:

http://shorl.com/fenogratregryke

It's about time your host updated PHP, though! 4.0.6 is nearly three
years old.

--
Mark.
Jul 20 '05 #5
In article <op**************@news.individual.net>,
Neal <ne*****@yahoo.com> writes:
Fixed. Very odd this only happens when served as XHTML...


Working hypothesis:

HTML has semantics, which make <body> the root element for the
display. XML has no such semantics. XHTML is parsed as XML.

You're benefitting from the additional semantics available in HTML.
To get it in XML you have to do it yourself, with properties on the
<html> and <body> elements.

--
Nick Kew

Nick's manifesto: http://www.htmlhelp.com/~nick/
Jul 20 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
7717
by: Brian Vallelunga | last post by:
I'm working on an asp.net site and am trying to implement a popup help window. I want the window to close when the user advances to the next page in our application. The thing is, I'm doing this on...
6
7474
by: Patrick | last post by:
Hi I am a newbie struggling a little with css.It is hard to get it right in all browsers, so i decided to read the CSS2 specification on the w3 site. What is the following from the CSS2...
5
3907
by: Unknown User | last post by:
Here's my page: http://www.abahia.com/smartads/ I want the beige background all over the page. It works fine in Opera 8, in IE 5.5 and 6, in Maxthon, but in Mozilla, there is a large white margin...
4
3040
by: Reed | last post by:
I'm having a problem with apostrophes & quotes when using body.innerHTML. With the statement: bodyText = document.body.innerHTML If there was a Form object on my page such as: <input...
6
7274
by: rob | last post by:
Hi I'm trying to create a "roll-up" effect when a window loses focus and then "roll-down" when it regains focus. This statement works properly with every browser I can get my hands on EXCEPT...
5
2207
by: Dan Novak | last post by:
Hello, I'm trying to apply different backgrounds to a page based on the BODY element class. It's working on some browsers but not on others. I've searched Google and the groups, pored through...
0
2109
by: cpavon | last post by:
Hello everyone, I am fairly new to MACT, I am currently trying to parse the oResponse.Body to retrive a dynamic values...store in an array and then randomly post those values. Does anyone...
5
3002
by: bipède | last post by:
Hi, Is it possible in Mozilla / Firefox / Netscape to fix minimum size for html and/or body element in a "real" XHTML (mime application/xhtml+xml) page so that when there is few text in a page...
3
2162
by: Tuxedo | last post by:
Is it possible to add a function call to the onUnload event handler from an external js file, or can this only be done via the body tag? In any case, I presume there can only exist one onUnload...
0
7131
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7007
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7174
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7220
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7388
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5470
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4919
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3099
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3091
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.