This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Stylesheets > April 2006 > Strange table layout





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Strange table layout
xmlizer

2006-04-17, 3:50 am

Hello

With this sample of HTML Code, I have a strange behavior in IE (which i
haven't in Firefox)

It make as it doesn't care about the the heights positionned

I positionned them as attribute height then as style, the result is the
same

The second row is not 88px high and i don't undestand why ?

Any idea ?

Thanks a lot

<code>
<table border="1" width="100%">
<tbody>
<tr>
<td height="1" width="168"></td>
<td height="1" width="100"></td>
<td height="1" width="*"></td>
<td height="1" width="15"></td>
<td height="1" width="100"></td>
<td height="1" width="18"></td>
</tr>
<tr>
<td colspan="2" style="width: 268px; height: 88px;">&nbsp;</td>
<td style="height: 88px;">&nbsp;</td>
<td colspan="2" style="width: 115px; height: 88px;">&nbsp;</td>
<td rowspan="3" style="width: 18px; height: 100px;">&nbsp;</td>
</tr>
<tr>
<td rowspan="3" style="width: 168px; height: 66px;">&nbsp;</td>
<td colspan="4" rowspan="4" style="height: 100%;"
valign="top">CONTENT</td>
</tr>
<tr>
</tr>
<tr>
<td style="width: 18px; height: 36px;">&nbsp;</td>
</tr>
<tr>
<td style="width: 168px; height: 100%;">&nbsp;</td>
<td style="width: 18px; height: 100%;">&nbsp;</td>
</tr>
</tbody>
</table>
</code>

Neredbojias

2006-04-17, 6:59 am

To further the education of mankind, "xmlizer" <xmlizer@XXXXXXXXXX>
vouchsafed:

> Hello
>
> With this sample of HTML Code, I have a strange behavior in IE (which i
> haven't in Firefox)
>
> It make as it doesn't care about the the heights positionned
>
> I positionned them as attribute height then as style, the result is the
> same
>
> The second row is not 88px high and i don't undestand why ?


Maybe because of this:

> <td style="width: 18px; height: 100%;">&nbsp;</td>


....although it's probably the rowspan(s). Tables aren't rendered the same
in all browsers nor under different doctypes.

--
Neredbojias
Infinity can have limits.
frederick@southernskies.co.uk

2006-04-17, 6:53 pm

xmlizer wrote:
> With this sample of HTML Code, I have a strange behavior in IE (which i
> haven't in Firefox)


No you don't!

> It make as it doesn't care about the the heights positionned


Yes it does!

> I positionned them as attribute height then as style, the result is the
> same
>
> The second row is not 88px high and i don't undestand why ?
>
> Any idea ?


Yes!

This is your second row:
> <tr>
> <td colspan="2" style="width: 268px; height: 88px;">&nbsp;</td>
> <td style="height: 88px;">&nbsp;</td>
> <td colspan="2" style="width: 115px; height: 88px;">&nbsp;</td>
> <td rowspan="3" style="width: 18px; height: 100px;">&nbsp;</td>
> </tr>

The final cell is 100px high! Fix that and your stated problem's
solved.

You also appear to have got muddled up with your cells, colspans, and
rowspans, but it's not immediately obvious what your intended layout
is? Anyway, that'd be one for c.i.w.a.h...


--
AGw.

Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews