CSS table default padding or margin

孤街浪徒 提交于 2019-12-05 02:14:00

Define

table { border-spacing:0; }

and it should render in the way you want.

You need to reset the default styles applied by the browser.

Try at the top of your css file:

table, table tr, table td { padding:none;border:none;border-spacing:0;}

And check into some popular CSS resets out there:

http://meyerweb.com/eric/tools/css/reset/ http://developer.yahoo.com/yui/reset/

I prefer to use this approach:

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