Internet Explorer Render Problem

M

Mythran

Can someone verify this error for me please and possibly explain why?

The only difference between Table #1 and Table #2 is the containing SPAN tag
on table #2 does NOT have width:100% in the style attribute. Otherwise,
they are exactly the same....looks fine in other browsers. This is a
partial result from a DataGrid inside a span. Just cut-n-paste and tidied
up the html to be a complete example for y'all :) Notice, that when it
renders in IE 6 (haven't tried other versions of IE) the border is gone from
Table #1, and it shows in Table #2...how does width on a parent container
effect borders of a child table?!?

Thanks,
Mythran


CODE BELOW:


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body>
Table #1:
<span style="background-color:blanchedalmond;width:100%;">
<table style="border:1px solid
silver;border-collapse:collapse;background-color:white;" rules=all
border="1">
<tr>
<td>Shipped By</td>
<td>Date Ordered</td>
<td>Date Required</td>
<td>Date Shipped</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</table>
</span>
<br>
Table #2:
<span style="background-color:blanchedalmond;">
<table style="border:1px solid
silver;border-collapse:collapse;background-color:white;" rules=all
border="1" ID="Table1">
<tr>
<td>Shipped By</td>
<td>Date Ordered</td>
<td>Date Required</td>
<td>Date Shipped</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</table>
</span>
</body>
</html>
 
B

Bruce Barker

the <span> is an inline element, not a block element, so borders and widths
are not suppoted. switch to a <div> which is a block element.

-- bruce (sqlwork.com)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top