Click to See Complete Forum and Search --> : topmargin="0" doesn't work in Firefox?


byte_eater
08-16-2006, 05:21 AM
Hey guys!

Why doesn’t the topmargin=”0” and leftmargin=”0” work in Firefox? In Explorer they are working great, but I have some problems doing this in Firefox!

How to fix this problem? Pls help!

Thanks!

the tree
08-16-2006, 05:51 AM
I haven't used those depreciated attributes for so long I can't remember what they get used for. Try using some code made for this century.style="margin: 0;"

byte_eater
08-16-2006, 07:18 AM
!!! hey, thanks a lot man!

WebJoel
08-16-2006, 07:21 AM
Hey guys!

Why doesn’t the topmargin=”0” and leftmargin=”0” work in Firefox? In Explorer they are working great, but I have some problems doing this in Firefox!

How to fix this problem? Pls help!

Thanks!

"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>