somehow this doctype does not support the 100% height I give to my main table.
I just wrote it like that
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%">
Any idea how to fix it?
somehow this doctype does not support the 100% height I give to my main table.
I just wrote it like that
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%">
Any idea how to fix it?
This isn't an issue that is restricted to XHTML; table elements don't have height attributes in HTML, either.Originally Posted by emanuelle
By the way, serving XHTML as HTML is pointless at best. If you are working with XML server-side, transform the output to HTML, first. If you are simply writing a document by hand, use HTML (HTML 4.01 Strict, preferably).
Remove the height attribute, and use CSS, instead. However, note that percentage values used with the height property has limitations. The containing block (typically the parent element) must have an explicit height property, otherwise the value is considered to be the same as the value, auto.Any idea how to fix it?
Mike
when I use HTML 4.01 Strict the height=100% in the table works.
I want the page to be 100% (height) and I have to use the XHTML doctype for further implementation.
1) It is always helpful if you leave a URL to your problem.
2) If your website is table based, then the default height is 100%. The only way it will be less then 100% is if you do not have enough content to fill the page to its base.
3) You should use the DOCTYPE to ensure the document is properly viewable to all standard compliant browsers eg.. just about all but IEHaHa
4)I would suggest you look into getting away from structuring your entire website without the dependency of tables. http://w3schools.org is a place you can get started on learning how to implement structuring based on "div"
In which browsers? I have seen 100% height 'work' in a non-standards compliant browser like IE, sometimes. Usually it causes problems in all other browsers and often breaks down, when you least expect it, even in IE.Originally Posted by emanuelle
Oddly enough, sometimes the situation vis a vis browsers and 100% height gets reversed. In either case, having your page work in only some browsers isn't generally a good thing. There is almost always a better way to get the desired layout than height 100%.
- John________________________
Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
For it to be 100%, (as in: really 100%) the margins also have to be 0
Code:<style type="text/css"> body { margin:0px } </style>![]()
- Mike
pissa:Um..I think you mean w3schools.com
Nonsense. The "default height" is the minimum possible whilst accommodating the content.2) If your website is table based, then the default height is 100%. The only way it will be less then 100% is if you do not have enough content to fill the page to its base.S/he is using a DOCTYPE, as is clear from the title and post.3) You should use the DOCTYPE to ensure the document is properly viewable to all standard compliant browsers eg.. just about all but IEHaHa
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
1) If the content is less then the viewed height, the table will not appear to be 100%.
2) Mike is correct about the margin rule...
is the only true way of making a table 100% height... but that would also make it 100% width too...Code:table { margin:0; padding:0; }
would make it 100% height then you could do whatever youw anted with the widthCode:margin-top 0; margin-bottom: 0;
(surfer-dude accent) Don't argue with the Twey, man.. Just be cool with whatever, dude..![]()
- Mike
Bookmarks