we all know that an xml document needs a root element, in xhtml this is <html>
however i am running into some CSS problems, mainly in the overflow attrib. (as far as i can see)
when i add the xml declaration, my html element looses the css configurations, is it the conflicting versions bitween the xhtml dtd and the xml? what could be causing this?
Code:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
......
</html>
__________________
Moderator:General web building Get out from under them, resist and multiply.
Get out from under precipice and see the sky.
i was testing in IE6
all styling to the <html> element stops when the xml declaration is added.
i know its not even required in a xhtml document, but i was putting it there for a reason.
__________________
Moderator:General web building Get out from under them, resist and multiply.
Get out from under precipice and see the sky.
That's the whole rub of it - if the first thing on the page is <?xml?> then IE6 goes into quirks mode, so the BODY represents the entire canvas; whereas Gecko, in that same situation, goes into Standards mode, where HTML represents the entire canvas.
As far as I know, there's no direct solution for this.
being stubborn ive been constantly trying to work with the w3 validator in getting this to work, no sucess but after messing around a bit, it keeps returning an error to me now that was never there before.
Quote:
Line 14, column 6: end tag for "body" which is not finished (explain...).
</body>
i stripped it down and this is literally all i have in my document, and its still returning the error, why?
Yes. Be careful with applying margins, padding, and borders with that though, as it will apply twice (once to html, and once to body) to any correct browser.
is it still correct CSS?
if overflow:hidden; goes in the html, and i add "html, body" it would apply to the body as well, but it doesnt go in the body, the only time that it would apply there is in IE quirks ....