force column size to smallest possible

感情迁移 提交于 2019-12-11 18:31:48

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!