I have a a td with an inline style setting its width as a percentage. I can modify the css but not the html.
How can I make the td only take up the width required by its contents?
The following CSS doesn’t work:
td#my
{
width: auto !important;
}
Table cells are auto width by default, they however take up the minimum width of the widest cell in their column. So take this for example
Those cells will all be the same width based on the first row. There is no way I can think of to force it to do this:
Which is what it sounds like you’re trying to do, not without changing the HTML anyway.