HighDots Forums  

Fixed cell width in table does not work in IE?

HTML Writing HTML for the Web (comp.infosystems.www.authoring.html)


Discuss Fixed cell width in table does not work in IE? in the HTML forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Bart Heinsius
 
Posts: n/a

Default Fixed cell width in table does not work in IE? - 08-26-2003 , 04:09 PM






Hi,
I can't get my cell widths fixed in a table in IE6. In Mozilla it
works, see http://www.xs4all.nl/~margreeh/aa.html .
It's the blue cells that remain fixed at 20pt widths in Mozilla but
not in IE. The HTML was generated with Mozilla's Composer.
Can anyone help getting this to work in IE?
Thanks already,
Bart.

Reply With Quote
  #2  
Old   
DKrapohl
 
Posts: n/a

Default Re: Fixed cell width in table does not work in IE? - 08-27-2003 , 08:55 PM






In some browsers you have to explicitly set the column widths for all
columns. It is a good idea to use both width=20 and
style="width:20px" to ensure cross-browser. Also make sure that the
total widths of all columns add up to the width of the table. When
creating a simple table with no rowspan or colspan properties, you can
set the column widths in the first row and save the extra bandwidth of
assigning it to every column in every row.

There are also many tools that will help you check your HTML both in
terms of validity and rendering in different browsers.
http://www.tranquillitas.com/resources/journals.aspx has a series of
links to testing resources that may help you.

Let me know if this doesn't solve your problem.

Don Krapohl
http://www.tranquillitas.com


eombah (AT) hotmail (DOT) com (Bart Heinsius) wrote in message news:<f611b2fd.0308261209.1b4b6be5 (AT) posting (DOT) google.com>...
Quote:
Hi,
I can't get my cell widths fixed in a table in IE6. In Mozilla it
works, see http://www.xs4all.nl/~margreeh/aa.html .
It's the blue cells that remain fixed at 20pt widths in Mozilla but
not in IE. The HTML was generated with Mozilla's Composer.
Can anyone help getting this to work in IE?
Thanks already,
Bart.

Reply With Quote
  #3  
Old   
Bart Heinsius
 
Posts: n/a

Default Re: Fixed cell width in table does not work in IE? - 08-29-2003 , 05:00 AM



Don,

Thanks for your reply.

I validated my HTML through http://validator.w3.org/ and is is valid
(now it is, anyway). But the problem remains.

I don't want to explicitly set the widths of all columns because I
want all columns to best fit except the column that I set to be 20px
wide.

Any other ideas?

Cheers,
Bart.

Reply With Quote
  #4  
Old   
DKrapohl
 
Posts: n/a

Default Re: Fixed cell width in table does not work in IE? - 08-29-2003 , 10:42 PM



See if you can work with this. It seems more elegant (from
http://www.htmlhelp.com/reference/ht...olgroup.html):

<TABLE SUMMARY="This table gives the character entity reference,
decimal character reference, and hexadecimal character
reference for 8-bit Latin-1 characters, as well as the
rendering of each in your browser.">
<COLGROUP>
<COLGROUP SPAN=3>
<COLGROUP SPAN=3>
<THEAD>
<TR>
<TH SCOPE=col ROWSPAN=2>Character</TH>
<TH SCOPE=col ROWSPAN=2>Entity</TH>
<TH SCOPE=col ROWSPAN=2>Decimal</TH>
<TH SCOPE=col ROWSPAN=2>Hex</TH>
<TH SCOPE=colgroup COLSPAN=3>Rendering in Your Browser</TH>
</TR>
<TR>
<TH SCOPE=col>Entity</TH>
<TH SCOPE=col>Decimal</TH>
<TH SCOPE=col>Hex</TH>
</TR>
</THEAD>
<TBODY>
<TR>
<TD SCOPE=row>non-breaking space</TD>
<TD>&amp;nbsp;</TD>
<TD>&amp;#160;</TD>
<TD>&amp;#xA0;</TD>
<TD>&nbsp;</TD>
<TD> </TD>
<TD>&#xA0;</TD>
</TR>
</TBODY>
</TABLE>

Let me know if this still doesn't work. You can also email me if you
wish.


Don Krapohl
http://www.tranquillitas.com
Website quality assurance testing

Reply With Quote
  #5  
Old   
Bart Heinsius
 
Posts: n/a

Default Re: Fixed cell width in table does not work in IE? - 09-01-2003 , 05:08 PM



Hmm, I tried the <COLGROUP> stuff but couldn't get that right.
Then I tried the other suggestion:
Quote:
table ... style="...; table-layout: fixed"
col
col
col width="20"
col
And that works! See my real-life page (a sample) on
http://www.xs4all.nl/~margreeh/indicator_details.html where I wanted
the cell width of the cells containing the graph images fixed.
Thanks,
Bart.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.