1 Attachment(s)
[RESOLVED] table colspan not working right
I've discovered something quite odd in IE 9 and FF 10.0.4 if you have this type of a table layout:
Code:
<table cellspacing="0" cellpadding="2" border="1">
<tr>
<td colspan="2">Column 1 & 2</td>
<td>Column 3</td>
</tr>
<tr>
<td>Col1</td>
<td colspan="2">Col 2 & 3</td>
</tr>
<tr>
<td>Col1</td>
<td colspan="2">Col 2 & 3</td>
</tr>
<tr>
<td>Col1</td>
<td colspan="2">Col 2 & 3</td>
</tr>
</table>
The result is not at all what you would expect:
Attachment 88882
Anyone have any idea why the last 3 rows are ignoring the colspan=2 on the 3rd cell?
Re: table colspan not working right
Ok not html-er so i never used colspan.I had to go read what it is.
Anyhow my guess is that you want the three "col1" 2nd columns cells to be "glued" to the first column ending border.Am i correct?If so here is what i thought could help.If i understood wrong let me know.
Code:
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<style type="text/css">
.tbl
{
width:100%;
position:relative;
}
.divm
{
width:500px;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<div class="divm">
<table cellspacing="0" cellpadding="2" border="1" class="tbl">
<tr>
<td colspan="2">Column 1 & 2</td>
<td style="width:70%">Column 3</td>
</tr>
<tr>
<td>Col1</td>
<td colspan="2" style="width:99%">Col 2 & 3</td>
</tr>
<tr>
<td>Col1</td>
<td colspan="2">Col 2 & 3</td>
</tr>
<tr>
<td>Col1</td>
<td colspan="2">Col 2 & 3</td>
</tr>
</table>
</div>
</form>
</body>
</html>
Re: [RESOLVED] table colspan not working right
Hmmm, interesting.
It's the
<td style="width:70%">Column 3</td>
and
<td colspan="2" style="width:99%">Col 2 & 3</td>
lines that do it.
Re: [RESOLVED] table colspan not working right
Lol, don't even know what we were talking about here but if you resolved it then i am happy with that. :wave: