Log in

View Full Version : Making <td> tag not stretch?



denhamd2
07-31-2008, 12:34 PM
Hi,

I have a div with a width of 300px placed inside a table cell with the following code <td width="200"> - I dont have access to edit the HTML therefore I need to find a solution in CSS. Basically I have the following settings for the <div> tag:



background-color:transparent;
background-image:none;
background-position:left bottom;
background-repeat:no-repeat;
left:145px;
margin-left:-8px;
padding-bottom:8px;
position:relative;
top:-105px;
white-space:nowrap;
width:300px;
z-index:1001;


but it is causing the <td> tag to stretch. is there any way I can keep the <td> tag its same width but have the <div> tag overflow out of it. I would have thought the z-index setting of 1001 would have achieved this but it didn't... any ideas?

mobius2000
08-01-2008, 05:53 AM
I'm just guessing here but I believe you would need access to the HTML. I had this problem in the past and by placing the absolute div markup above the table code and using margin-top:"your value" and margin-left:"your value" it will float over the top of the table and it's contents (if you mean for it to do so).

I stress again, it's is just a hunch so if you get access to the HTML and try it, please wait for someone else to confirm if my response is correct. :o

All the best.

chas
08-02-2008, 02:09 AM
i think you need to access the html code, coz you can do

overflow-x: hidden

thats on the TD tag, TDs will take the dimensions of the content