[thelist] Accessing table cell properties with CSS?

Jonathan_A_McPherson at rl.gov Jonathan_A_McPherson at rl.gov
Thu Jun 27 16:21:01 CDT 2002


Ideas:

-- one --
Since you are already sinning, you may as well try the Invisible GIF trick:

Obtain a 1x1 transparent GIF.

Put it in the blah cell --
<img src="1pxtransparent.gif" alt="" width="298" height="1">

Ta-da. IE will not shrink your cell. Now make it a width="1%" cell, and it
won't grow the cell either.

This is a dirty trick.

-- two --
Are you sticking a width on the "blah" cell at all? e.g.

<td id="blah" width="298">

If not, you ought to do so. (You might also use the CSS width property --
style="width: 298px;")

-- three --
What are you trying to achieve that _requires_ the use of innerHTML? Maybe
you _do_ have a choice. (-:

--
Jonathan McPherson, LMIT/SD&I
Software Engineer & Web Systems Analyst
email / jonathan_a_mcpherson at rl dot gov


-----Original Message-----
From: Tom Dell'Aringa [mailto:pixelmech at yahoo.com]
Sent: Thursday, June 27, 2002 1:38 PM
To: thelist at lists.evolt.org
Subject: [thelist] Accessing table cell properties with CSS?


Ok, this is going to sound really backward (and I think I am barking
up the wrong tree) but - is there anyway to control the Width of a TD
with CSS? I cannot seem to do it. You might ask why...

I have a table row with 2 cells:

+-------+-----------------------+
+ blah  +      links here       +
+-------+-----------------------+

I am being forced to rewrite the second cell "links here" section,
using innerHTML - yes I know, ugly, brutal, not good - I have no
choice. The "blah" cell is set to a width of 298, the other cell has
no setting.

When I rewrite the second cell with the new links - I completely lose
the width of the "blah" cell - and I need it to stay at 298 or it
blows the whole look.

I figured maybe rewriting the TD width at the same time would solve
the problem, but I can't seem to do it. Any help or suggestions...

Tom

=====
var me = tom.pixelmech.webDeveloper();
http://www.pixelmech.com/




More information about the thelist mailing list