homepage Welcome to WebmasterWorld Guest from 54.226.147.84
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderators: not2easy

CSS Forum

    
Table trouble
td width acting weird...
fmaz

10+ Year Member



 
Msg#: 4006 posted 5:19 pm on Jun 30, 2004 (gmt 0)

ok ...
Here is my code:

<table border="1" style="width:100%;">
<tr>
<td colspan="2" style="width:100%;" align="center">Title!</td>
</tr>
<tr>
<td style="width:100px;">menu (100px)</td>
<td style="width:auto;">page (take all remaining space)</td>
</tr>
</table>

I want the "menu" to be 100px ... STATIC
I want the "page" column to take "all the page" - 100px

It doesn't work under IE6 ... didn,t tried yet under FireFox, but anyway, it must work under IE... :\

any idea?

 

DigitalSorceress

10+ Year Member



 
Msg#: 4006 posted 7:05 pm on Jun 30, 2004 (gmt 0)

CSS and tables don't always play too nicely together. Since you aren't really using classes and other abstractions, Why not change from

<td colspan="2" style="width:100%;" align="center">

to

<td colspan="2" width="100%" align="center">

...

<td wodth="100">menu (100px)</td>
<td width="100%">page (take all remaining space)</td>

The 100% will end up taking up 100% of the available space, so it should work. Actually, since your table is 100% width and you've specified a pixel width for the other td, the "take all remaining space" td shoulc do just that with no width specification whatsoever

SuzyUK

WebmasterWorld Senior Member suzyuk us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 4006 posted 11:06 am on Jul 1, 2004 (gmt 0)

Hi and Welcome to WebmasterWorld fmaz!

in this case it's a wierd IE table bug.. not CSS ;)

it's triggered when colspan is used in conjuction with a width on the <td>.. sometimes, depending on the layout the only solution is to nest a table, but in the case of the code posted if you just remove the bold bit from the line below:

<td colspan="2" style="width:100%;" align="center">Title!</td>

it should play nice again, that particular cell will already know to be 100% wide because of the width on the overall table..

Suzy

fmaz

10+ Year Member



 
Msg#: 4006 posted 8:21 pm on Jul 1, 2004 (gmt 0)

Hum, thank's ...
for now, somethime I user a blank 1x1px gif and then I do something like this:

<img scr="transp.gif" width="100px" height="1px">

this solve some "min-width" problem.. but..
[cap] When did IE will work with REAL standar?[/cap]

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / CSS
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved