Forum Moderators: open

Message Too Old, No Replies

Removing the standard white border of webpages

         

turbohost

10:47 am on Aug 26, 2006 (gmt 0)

10+ Year Member



Hi guys,

I want to place a banner in the top left corner of a webpage but I always get a small white border at the border of the page. Is there a way I cn remove this border?

Turbo

kaled

11:31 am on Aug 26, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



CSS

html,body { margin:0px; padding:0px }

I think that will work in all browsers. Opera might still have a one pixel white border but I don't think there's anything to be done about that.

You may wish to enclose the remainder of your page contents in a div with padding.

Kaled.

Robin_reala

11:48 am on Aug 26, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Couple of additions to Kaled's answer: you don't need to specify the 'px' if your value is 0 (0 is 0 in any notation), and you don't need add an extra div in for padding - just set it directly onto <body>.