Forum Moderators: open

Message Too Old, No Replies

Browser border removal?

         

Spencer_P

10:50 am on Nov 6, 2006 (gmt 0)

10+ Year Member



Hi,

I've recently built a website that has to be viewed in both IE and Firfox etc however I've used the :

<body topmargin="0" leftmargin="0" bgcolor="#FFFFFF" >

to force the site to the top left corner in IE but this doesn't seem to do the same effect in Firefox...What will?

The annoying border still remains!

Thanks
Spence

dreamcatcher

3:07 pm on Nov 6, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi Spencer_P,

You probably also need 'marginleft' and 'margintop' as Firefox uses the same rendering engine as Netscape. Personally I would just use a stylesheet:

body {
margin: 0;
padding: 0;
}

dc

StupidScript

10:59 pm on Nov 6, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



As dreamcatcher wrote, using stylesheets is the preferred method of handling this in Gecko-based browsers. If you try to validate your code, you'll notice that "topmargin", "leftmargin", "margintop" and "marginleft" are all illegal attributes of the BODY tag ... not part of the spec. Stick to stylesheets if you want consistency.