atholon Posted August 26, 2009 Share Posted August 26, 2009 Have any of you guys run into the issue with XHTML and 100% body height? If I don't use any DTD on my pages I can specify 100% height for the body of my page but once that DTD is on there it removes that capability. I've seen somewhere that W3 has depreciated 100% height and width on the body... but I couldn't find anything on their site. Does anyone know what we are supposed to do now if we still want that DTD/W3 validation? Quote Link to comment Share on other sites More sharing options...
trq Posted August 26, 2009 Share Posted August 26, 2009 Use html, ie doesn't render xhtml as xhtml anyway. Quote Link to comment Share on other sites More sharing options...
Kieran Menor Posted August 26, 2009 Share Posted August 26, 2009 I think you might have to do it for both html and body. Like: html, body { height: 100%; } Quote Link to comment Share on other sites More sharing options...
haku Posted August 27, 2009 Share Posted August 27, 2009 You are much better off using XHTML 1.0. XHTML 1.1 isn't very well supported. Quote Link to comment Share on other sites More sharing options...
TheFilmGod Posted August 27, 2009 Share Posted August 27, 2009 Which ie version? I never had a problem with 100% height or anything. Quote Link to comment Share on other sites More sharing options...
Daniel0 Posted September 7, 2009 Share Posted September 7, 2009 Which ie version? I never had a problem with 100% height or anything. Any version. IE doesn't support XHTML at all. It supports fake "XHTML" that is served (and thus parsed and handled) as HTML, sure, but it has never supported XHTML. Quote Link to comment Share on other sites More sharing options...
saltedm8 Posted September 7, 2009 Share Posted September 7, 2009 xhtml is not 'fake' html at all in any browser. its an extendable version of html, which means that if you want to use xml for feeds etc, you can.. your right that it reads it as html ( but that's in every browser, not just IE, ) it would make no issues to the coding itself as its perfectly valid and legal to use whether you are using xml or not. with the issue of height 100%.. if you just dont mention the height at all, that is exactly like height 100% because its not restricted by an 'un-said' height, it just keeps going until its stopped by a div, table or the bottom of your screen. Quote Link to comment Share on other sites More sharing options...
Daniel0 Posted September 7, 2009 Share Posted September 7, 2009 That is not what I said at all. XHTML served as text/html is "fake" HTML, or rather invalid HTML. There is a long topic about it here: http://www.phpfreaks.com/forums/index.php/topic,241805.0.html Quote Link to comment Share on other sites More sharing options...
saltedm8 Posted September 7, 2009 Share Posted September 7, 2009 I really dont know where people get that idea from.. I am honestly interested in where it says that at w3c? ( and being totally honest I am not interested in an 'un-official' debate to prove a point from a place that has no official authority ) .... so in your eyes, even w3c are using 'fake' html because if you look at their doctype it also has text/html on an xhtml doctype. until I see it at w3c ( It might be there, im not saying its not ) my view on it is this if you had a car, and you added a caravan does that mean its no longer a car ?.. in my view its an extension of the car. Quote Link to comment Share on other sites More sharing options...
Daniel0 Posted September 8, 2009 Share Posted September 8, 2009 http://www.w3.org/TR/xhtml-media-types/#text-html XHTML documents served as 'text/html' will not be processed as XML [xml10], e.g., well-formedness errors may not be detected by user agents. Also be aware that HTML rules will be applied for DOM and style sheets (see guidelines 11 and 13). You can do a quick little check yourself. Find an "XHTML" document served as text/html (e.g. this page) and then find a self-closed tag. Check the source in Firefox. Notice that the / is in red. Now create an XHTML page and serve it as application/xhtml+xml. Notice that it is no longer red. Why does this happen? Well, something like <br /> is invalid HTML, so if you tell the browser via the content-type header that it's HTML, it'll treat it as HTML. Firefox marks up syntax errors in red. Try to make a a more drastic syntax error and notice the red-ness. I would recommend you to read the thread I linked to. It has already been discussed, and I believe I proved some additional examples of how the parsing differs if you use text/html versus application/xhtml+xml. If you have anything new to add, I'd be happy to discuss it with you in that topic. I'm not interested in reiterating myself, however. Quote Link to comment Share on other sites More sharing options...
saltedm8 Posted September 8, 2009 Share Posted September 8, 2009 I have seen that line you have copied up on w3c, but it still does not say that its serving 'fake' html, all it says is that the xml bits will be ignored ( so its not 'serving' the xml at all, only the html - meaning its not serving 'fake' html to the end user ) like for example, php is ignored Quote Link to comment Share on other sites More sharing options...
Daniel0 Posted September 8, 2009 Share Posted September 8, 2009 Things served as text/html are treated as HTML, things served as image/png are treated as PNG, things served as text/plain is treated as plain text. It's common sense, and it's how the HTTP protocol works; you treat things like the content-type header says it is. It doesn't make sense if it should handle any other arbitrary data. So do you expect that if you put Haskell, Ada or C that it would interpret and execute that as well? Probably not, so why do you expect the same for XHTML? Sure, I can distinguish between these languages, but a computer cannot, so it just assumes you aren't lying. Also, what do you mean with "PHP is ignored". The browser doesn't ignore PHP. You are also contradicting yourself. You say "the xml bits will be ignored". If you ignore the XML bits in XHTML then it is per definition not XHTML. When parsing HTML you specifically ignore invalid things and try to serve it up anyways. Just because it doesn't have draconian error handling like XML and halts at a syntax error doesn't mean that it regards the invalid data as valid, or accepts anything you give it. Again, I would recommend you to read the topic. You are hardly bringing anything new to the discussion. Quote Link to comment Share on other sites More sharing options...
saltedm8 Posted September 8, 2009 Share Posted September 8, 2009 I have posted my next reply to the bottom of that discussion. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.