Closed Bug 265887 Opened 20 years ago Closed 20 years ago

Td width not goot if a row is ablosute positionned

Categories

(Firefox :: General, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: barboni, Assigned: bugzilla)

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3) Gecko/20040913 Firefox/0.10
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3) Gecko/20040913 Firefox/0.10

When browsing the following code the first row is shorter than des 2nd and 3rd one.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>view.php</title>

<style type="text/css">
#divBg {
	left: 0px; 
	position: absolute; 
	top: 0px; 
 	height: 15px
}
table {
  position: absolute;
  top:0px;
  left:0px;
}
</style>
</head>
<body>

<table border="2" cellpadding="0" cellspacing="0" width="100%"
style="table-layout:auto" >
<tr id="divBg" style="height:12.75pt">
<td>A</td>
<td>B</td>

<td>C</td>
</tr>
<tr style="height:12.75pt">
<td style="width:25pt;background-color:white;color:#000000;">1</td>
<td style="width:75pt;background-color:white;color:#000000;" >Abishaii Bleu</td>
<td style="width:55pt;background-color:white;color:#000000;" >[Initial]</td>
</tr>
<tr style="height:12.75pt">
<td style="width:25pt;background-color:#EEEEEE;color:#000000;">1</td>
<td style="width:75pt;background-color:#EEEEEE;color:#000000;" >Abishaii Noir</td>
<td style="width:55pt;background-color:#EEEEEE;color:#000000;" >[Novice]</td>

</tr>
</table>
</body>
</html>

Reproducible: Always
Steps to Reproduce:
1.
2.
3.

Actual Results:  
A B C appears on an independent row with small width

Expected Results:  
A B C should have 100% width
<tr id="divBg" style="height:12.75pt"> ?

why do you position (id) the <TR> i/o of the <table> ?

When you position a table row absolutely, it's display value is no longer
'table-row'.  It becomes a block-level element.  So if you don't specify a
width, its width becomes 'auto': wide enough to enclose its content.

The rendering you are getting is correct.  Bug is invalid.
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.