table height set in css as 100% not working in standards mode

RESOLVED DUPLICATE of bug 115421

Status

()

Core
CSS Parsing and Computation
RESOLVED DUPLICATE of bug 115421
17 years ago
16 years ago

People

(Reporter: Dwight Brown, Assigned: karnaze (gone))

Tracking

Trunk
Future
x86
Windows 2000
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

17 years ago
Setting a <table> tag's height property using css (height: 100%;) does not
effect the tables height, even if body, html { height: 100%; } is defined.

testcase:
http://test.invisiband.net/ver2/table_test.html

I have also noticed that css height/width properties do not seem to be supported
on many tags, such as <a>, etc.... perhaps this is not a part of the css spec?

Comment 1

17 years ago
 Even the style "text-align: center" in the body tag does not center the table 
in the body. I think this should be filed as a seperate bug as this bug deals 
with style { height: 100%; } in the body tag. Marking confirmed.
Status: UNCONFIRMED → NEW
Ever confirmed: true

Comment 2

17 years ago
 I think this is a style system problem and not tables since this deals with 
style in <body> tag.
Component: HTMLTables → Style System
(Reporter)

Comment 3

17 years ago
Yes, I actually did file the centering bug seperately, in:
http://bugzilla.mozilla.org/show_bug.cgi?id=119411

It was marked as a dupe of 49274, which does not address centering via the BODY 
tag.

Am I also incorrect in thinking that <center>/align="center" should NOT work if 
a page is using strict.dtd?

Updated

17 years ago
Target Milestone: --- → Future

Comment 4

16 years ago
While fuddling about with this, I have found that if you set

body {
  position: absolute;
  height: 100%;
  margin: 0px;
}

table {
  height: 100%;
  text-align: center;
  vertical-align: middle;
}

your table will then nicely fill the screen.  This works very nicely for
horizontally and vertically centred content (and also seems to work for IE,
which is nice).

I still would like to see the bug fixed -- absolute positioning shouldn't be
required to make this work...

Comment 5

16 years ago
*** Bug 133352 has been marked as a duplicate of this bug. ***

Comment 6

16 years ago
text-align does not apply to block elements. That's not how you center block
elements.

Comment 7

16 years ago
Invalid. see bug 115421

*** This bug has been marked as a duplicate of 115421 ***
Status: NEW → RESOLVED
Last Resolved: 16 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.