Closed
Bug 111394
Opened 23 years ago
Closed 23 years ago
valign="middle" not working properly
Categories
(Core :: Layout, defect)
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: david.mozilla, Assigned: attinasi)
References
()
Details
(Keywords: testcase, Whiteboard: [bae:20011211])
From Bugzilla Helper: User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.6) Gecko/20011120 BuildID: 2001112009 Trying to align a table in the middle and center of a window. Using: <table style="width: 100%; height: 100%"> <tr valign="middle"> <td align="center"> <table> ...content of nested table... etc. the table centers itself but appears online after what seems to be equivalent to 2 line breaks instead of being in the middle of the page (vertical-wise). then something even more strange is happening when two lines of text are parsed before even the <!doctype> definition (which makes the page non-valid to the rules): the table appears correctly. Opera 5 and MSIE 5.5 are showing the page correctly see http://www.closetwork.org/~david/bugzilla/valign.php for first case http://www.closetwork.org/~david/bugzilla/valign2.php for second case Reproducible: Always Steps to Reproduce: 1. http://www.closetwork.org/~david/bugzilla/valign.php for first case 2. http://www.closetwork.org/~david/bugzilla/valign2.php for second case Actual Results: 1. table does not align in the middle 2. table aligns in the middle but method is not w3-valid Expected Results: should render like in Opera 5 / MSIE 5 windows.
Reporter | ||
Comment 1•23 years ago
|
||
Error dissapears when <!DOCTYPE ... > declaration is typed without the DTD url
Actually the valign="top" doesn't work at all no matter where it is tr or td. This is not following the w3c specification. Gecko broken maybe?
Figured out what is happening. If you put <p></p> around the text inside the table cell then it causes a line feed prior to the text which can look sort of like the valign tag isn't working, but it is, it's just the <p> tag causing the extra line break. Leaving out the <p> tags avoids the problem. This is not the correct way to handle the paragraph tag. The paragraph tag should only cause a paragraph break if the previous tag is a tag that is on the same level in the hierarchy. Say for example: <td> <p>Blah blah blah</p> <p>And more blah blah</p> </td> First <p> has no paragraph break first, whereas second <p> has a paragraph break first then the text. or <div> <p>Blah blah blah</p> <p>More blah blah blah</p> </div> Check if last tag is same level, if so do paragraph break.
Comment 4•23 years ago
|
||
The second test case has garbage before the doctype, so the second one is rendering in quirks mode. Both test cases render the same in IE6 and in the moz build from 2001121103. this is a wfm for me
Keywords: testcase
Whiteboard: [bae:20011211]
Comment 5•23 years ago
|
||
WFM in the Dec 14th build (2001-12-14-05) under OS X .
Status: UNCONFIRMED → RESOLVED
Closed: 23 years ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•