Closed
Bug 187763
Opened 22 years ago
Closed 22 years ago
table %age height attribute doesn't work if you specify a DOCTYPE at the top of your document
Categories
(Core :: Layout: Tables, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: davyd, Unassigned)
Details
Attachments
(3 files)
User-Agent: Mozilla/5.0 Galeon/1.2.6 (X11; Linux i686; U;) Gecko/20020830 Build Identifier: Mozilla/5.0 Galeon/1.2.6 (X11; Linux i686; U;) Gecko/20020830 Both the lines <table height="100%"> and <table class="foo"> where foo is a CSS class containing: .foo { height: 100%; } do not render correctly if the top line of your HTML is something similar to: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" The major problem with this is that (X)HTML doesn't validate if the DOCTYPE isn't on the first line. Reproducible: Always Steps to Reproduce: 1. 2. 3.
Upon further research, it appears it also affects padding attributes. Having the DOCTYPE specified creates a 1em padding on the bottom of table cells containing forms. Removing the DOCTYPE makes this go away.
Comment 2•22 years ago
|
||
doctype triggers strict-compliance mode. You should also test latest 1.3a build to check if this this also happen, can you attach a testcase ?
Comment 3•22 years ago
|
||
I think, this is dupe of bug 19961. I think bug 19961 comment 57 provides a testcase for this case.
Validates as XHTML 1.0 Transitional but doesn't render correctly. Seems to render correctly under IE. Requires default.css (also attached to work)
This is a modification on the test case, leaving out the DOCTYPE therefore making it work.
OK, I added a testcase, a demonstration of what it does without the DOCTYPE and the CSS. They are all taken from my current project which is how I discovered the bug.
Comment 8•22 years ago
|
||
For XMTML there is bug 158439 with this case.
Comment 9•22 years ago
|
||
See bug 115421. Bug 115421 comment 6 have a simple description of this behaviour.
Comment 10•22 years ago
|
||
And also try this with a newer build.
Reporter | ||
Comment 11•22 years ago
|
||
It also happens with 1.2b, I'm not sure what's happening with 1.3a that seems to be a little garbled, investigating at the moment.
Reporter | ||
Comment 12•22 years ago
|
||
Hmm, my 1.3a problem was fonts related. However, the bug is still there. It doesn't go full screen with the DOCTYPE specified.
Comment 13•22 years ago
|
||
Davyd, do you read Bug 115421 comment 6? There is stated, that 100% mean's not "full viewport" height, but full parent node heigh -- so it is mean (in standarts mode) that 100% counting from body -- so you see correct behavior. Use <html style="height: 100%;"> <body style="margin: 0px; height: 100%;"> <table height="100%"> if you want to obtain viewport height.
Reporter | ||
Comment 14•22 years ago
|
||
ok, so this work nicely it seems. Is this actually in the standard? Or is it just a work-around?
Comment 15•22 years ago
|
||
It's in the standard.
Status: UNCONFIRMED → RESOLVED
Closed: 22 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•