问题
I have a table with information in it and an icon in the last column that perfoms a function. I was wondering if it were possible to force that column to be as small as possible (i.e. as wide as the icon). Currently it has a fair bit on white space that i cant get rid of. I have tried setting the width tp 1% and 1px. How to i force it smaller?
Thanks
回答1:
Your table width is set to 100%, no? Try adding another column after your icon column with blank cells and see if that does not take some of the extra width away.
回答2:
Set width for TD tag as same as width for IMG tag(icon), like this code: <td width="16"><img width="16" ... />
来源:https://stackoverflow.com/questions/5215525/force-column-size-to-smallest-possible