您的位置:首页 > 产品设计 > 产品经理

topmargin=\"0\" doesn\'t work in Firefox?

2013-07-12 11:01 375 查看
topmargin="0" doesn't work in Firefox?
"topmargin", "bottommargin", "leftmargin" and "rightmargin" are proprietary ("IE") selectors. They only work on IE. Other browsers do not understand this, and ignore them. Best to not use them.

I always add this before "</head>" which does the same thing, AND it is what all browsers do by default. All except IE, which 'assumes' several pixels for each value. This line re-sets IE to "zero" and makes your page be identical with all browsers...:

<style type="text/css">
body, html {margin:0; padding:0; border:0;} /* Re-sets IE to "zero" for these values */

</style>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: