Table Cells not appearing when styles are applied to them

VERIFIED DUPLICATE of bug 2479

Status

()

P3
normal
VERIFIED DUPLICATE of bug 2479
19 years ago
19 years ago

People

(Reporter: kinger, Assigned: karnaze)

Tracking

Trunk
x86
Windows NT
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(3 attachments)

(Reporter)

Description

19 years ago
Platform : Windows NT
Build: Milestone 11
Could relate to bugs: #3992, #7714
Notes: Behaves differently in IE5 (the table does not appear), but I'm not sure
of their support for CSS.

Applying (quite a few) stylings using an external stylesheet to <TD> elements.
The tables appear, but with none of the cells.  Appears to be that they are not
showing at all.  I will put the code here, but the CSS is lengthy.

<HTML>
<HEAD>
   <link rel="stylesheet" href="intable.css">
   <TITLE>INtable</TITLE>
</HEAD>
<BODY>

<div>
<table class="cov">
	<td class="s1"> Storyname 1 </td>
	<td class="cvrpiv"><img alt="Cover Image" src="default.gif" /></td>
	<td class="s2"> Storyname 2 </td>
        <td class="auth"> Author </td>
</table>

<table class="pl1">
        <td class="l1"><span>First language.</span></td>
        <td class="l2"><span>Second language.</span></td>
        <td class="pict"><img alt="Picture" src="default.gif"></td>
</table>
</div>

</BODY>
</HTML>

------------------------------------------------------------

div {
	display: block;
	font-family: Comic Sans MS, Arial;
	font-size: 14;
	background-color: #FFFFCC;
	width: 100%;
	height: 100%;
}

/* Cover Page layout settings */
table[class=cov] {
	display: block;
	position: relative;
	background-color: #3333FF;
	width: 98%;
	height: 470px;
	border-style: solid;
	border-color: black;
	border-width: thick;
}

td[class=s1] {
	display: block;
	position: relative;
	border-width: thin;
	border-style: inset;
	background-color: #FFFFCC;
	font-size: 20;
	font-weight: 600;
	text-align: center;
	color: black;
	width: 50%;
	height: 5%;
	top: 5%;
	left: 25%;
}

td[class=cvrpic] {
	display: block;
	border-width: thin;
	position: absolute;
	height: 50%;
	width: 90%;
	top: 15%;
	left: 5%;

}

td[class=s2] {
	display: block;
	position: relative;
	border-width: thin;
	border-style: inset;
	background-color: #CCFFFF;
	font-size: 20;
	font-weight: 600;
	text-align: center;
	color: black;
	width: 50%;
	height: 5%;
	top: 65%;
	left: 25%;
}

td[class=auth] {
	display: block;
	position: relative;
	border-width: thin;
	border-style: inset;
	background-color: white;
	font-size: 20;
	font-weight: 600;
	text-align: center;
	color: black;
	width: 50%;
	height: 5%;
	top: 70%;
	left: 25%;
}

/* Default Page layout settings */
table[class=pl1] {
	display: block;
	position: relative;
	background-color: #3333FF;
        width: 98%;
	height: 500px;
	/*hidden: true;*/
	top 5%;
	left: 1%;
	right: 1%;
	border-style: solid;
	border-color: black;
	border-width: thin;
}

html_img, img {
	display: inline;
	border-style: solid;
	position: relative;
	height: 100%;
	width: 100%;
	left: 0%;
	top: 0%;
}

td[class=l1] {
	display: inline;
	position: absolute;
	/*clip: auto;
	overflow: scroll;*/
	background-color: #FFFFCC;
	left: 1%;
	top: 1%;
	width: 49%;
	height: 48%;
}

td[class=l2] {
	display: block;
	background-color: #CCFFFF;
	position: relative;
	left: 1%;
	top: 51%;
	width: 49%;
	height: 48%;
}

/* Picture element layout options */
td[class=pict] {
	display: block;
	border-width: thin;
	position: absolute;
	left: 51%;
	height: 96%;
	width: 47%;
	top: 1%;
}

span {
	margin-left: 3%;
	margin-right: 3%;
	display: block;
	color: black;
}

Comment 1

19 years ago
Created attachment 3643 [details]
testcase; original example by bking

Comment 2

19 years ago
Created attachment 3644 [details]
testcase; reduced from the original

Comment 3

19 years ago
Created attachment 3645 [details]
testcase; change TABLE & TD to DIV in reduced test (but same CSS classes)

Comment 4

19 years ago
The first problem on this bug is that redefining TABLE and TD to
 {display: block;} does not appear to work correctly. (There may be
 further problems, but this one tends to obscure any others). I've
 added three attachments:

 The first is just the example posted by bking, with these small changes:
   1) moved CSS into a STYLE section in the HEAD (disabled LINK)
   2) default.gif -> http://www.mozilla.org/newlayout/l.gif
   3) validated and cleaned up CSS to spec

 The second attachment just tries to walk before running, and reduces
 the submitted example to :

   <div>                                   <!-- this is {display: block;} -->
     <table class='cov'>		   <!-- this is {display: block;} -->
       <td class='s1'> Storyname 1 </td>   <!-- this is {display: block;} -->
     </table>
   </div>

 The contents of the TD element do not display.

 The third attachment converts the TD and TABLE into DIV (with same class) from
 the second, reduced example.

   <div>                                    <!-- this is {display: block;} -->
     <div class="cov">                      <!-- this is {display: block;} -->
        <div class="s1"> Storyname 1 </div> <!-- this is {display: block;} -->
     </div>
   </div>

  When using DIV, the contents of the innermost DIV do display.
(Assignee)

Updated

19 years ago
Assignee: karnaze → troy
(Assignee)

Comment 5

19 years ago
Troy, since the 2nd attachment has no tables in it (all table elements have been
given display:block) please decide if this bug is invalid.

Updated

19 years ago
Assignee: troy → karnaze

Comment 6

19 years ago
Chris, I think this is valid. Look at the testcase that says "testcase; reduced
from the original".

What it is doing is this:

<table class="cov">
        <td class="s1"> Storyname 1 </td>
</table>

where stylistically both <table> and <td> are set to "display:block". That
should override the default display type.

What seems to be happening is that because our table content model is normalized
we have <tbody> and <tr> elements. So even through we create a block for the
<table> element we create an anonymous table for the <tbody> element.

We should not do that for the <tbody> because it's an anonymous content element
that we created. Instead we should wait until we find a real table element.

Here's the frame model:
  Area(table)(1)@020EB89C next=020EBA2C {0,0,10704,7200} [state=00180014]<
    line 020E5620: count=1 state=block,,,[0x402] {75,75,0,0}<
TableOuter(tbody)(0)@020EB8E8 {75,75,0,0} [state=00000004]<
        Table(tbody)(0)@020EB938 {0,0,0,0} [state=00000004]<
          TableRowGroup(tbody)...
(Assignee)

Comment 7

19 years ago
Table frame construction will create anonymous parent frames for table-element 
content per the CSS-2 spec. The problem (consider the 2nd attachment) is that 
the parser is generating content nodes <tbody> and <tr> between the supplied 
<table display=block> and <td display=block> nodes. The frame constructor 
encounters the <tbody> which doesn't have a parent of display=table and 
generates an anonymous table parent. This would still be ok if the frame 
constructor wrapped the block (containig the text) inside a table cell and had 
it descend from the tbody frame. It is apparantly not doing this. 

Marking as a dup of 2479.
of 

I can think of 2 solutions to the problem. Either the parser doesn't generate 
such content or it marks content as generated (possibly using a single bit). 

*** This bug has been marked as a duplicate of 2479 ***
Status: NEW → RESOLVED
Last Resolved: 19 years ago
Resolution: --- → DUPLICATE

Comment 8

19 years ago
Verifying dup of #2479
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.