Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

HTML tables, the width attribute, CSS, and ASP.NET 2.0

0 views
Skip to first unread message

Nathan Sokalski

unread,
Jan 4, 2007, 2:25:40 AM1/4/07
to
I recently switched from ASP.NET 1.1 to ASP.NET 2.0. I'm not sure exactly
why, but my HTML tables (which are just html tags, not server-side tags),
are looking kind of strange. My table layout is as follows:

<table border="0" cellpadding="0" cellspacing="0" bgcolor="white"
width="1000" align="center">
<tr><td colspan="3"></td></tr>
<tr valign="top" style="padding-top:15px;padding-bottom:15px;">
<td width="205" align="center"></td>
<td width="528" align="center"></td>
<td width="267"></td>
</tr>
<tr><td colspan="3"></td></tr>
</table>

The first row contains an img that is exactly 1000 pixels wide. The second
row contains three columns, the first and third of which I want to be
exactly 205 and 267 pixels wide, the second column should take up the
remaining space (which should be 528 pixels). The third column seems to be
ending up being too wide. I looked for a CSS property to fix this, but I
could not find one. One thing that I did find was
style="table-layout:fixed;" as seen on the following page:

http://www.w3.org/TR/REC-CSS2/tables.html#fixed-table-layout

However, if I understand correctly, this only looks at the width attribute
if it is specified in the first row. This obviously won't work for my table
because my first row spans all three columns. What do I need to do to make
my table render with the widths that I specify?

--
Nathan Sokalski
njsok...@hotmail.com
http://www.nathansokalski.com/


0 new messages