Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

setting table width

Status
Not open for further replies.

jagdipa

Programmer
Jul 17, 2003
3
GB
I have a table, and I want to set the width of one of the cells/columns.
The cell in question has a background image that is 14 pixels in width and 18 pixels in height.
When I dont put the width of the columns in, only a very small ammount of the image is displayed. When I set the width as 14px, then the columns is expanded too far. I have to set the pixel size to around 2px to make the column width the same as the image.

Any ideas what's wrong?

Jagdip
 
o.k, when u set the column widht to 14px it must work. but for that i need to know ur table tag. is ur table width in % or in px?

Known is handfull, Unknown is worldfull
 
My table does contain cellpadding=0. The table width is set to 100%. I have three columns in the table. The first and last columns need the widths set, and these are the ones that do not work.

Is there a way I can set the image as an image (not a background image), so that the column automatically expands to the image width?

Jagdip
 
if the table widht is in % the cell width will automatically be % even if u type px. therefore ur 14px was taken to be 14%, change the table wisth also to px (780px)...

Known is handfull, Unknown is worldfull
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top