FRIHOSTFORUMSFAQTOSBLOGSDIRECTORY
You are invited to Log in or Register a Frihost Account!

Buffer zone around the page, how to remove?

 


Mosquito.Tyler
On every site there is a buffer zone around the outside of the page. I'm curious if there's a way to change/remove this? See, IE and FF display that buffer zone differently.

Any ideas?
woodenbrick
something like this perhaps?
Code:

body { margin: 0px 0px 0px 0px; }
mariohs
Or even better, browsers have different implementations of default margins and paddings, so it's better to remove it from all elements and style your site from scratch.

Code:
*{margin:0; padding:0;}


Note that:
margin:0px 0px 0px 0px; or margin:0 0 0 0; is the same as margin:0;.
varun_dodla
mariohs wrote:
Or even better, browsers have different implementations of default margins and paddings, so it's better to remove it from all elements and style your site from scratch.

Code:
*{margin:0; padding:0;}


Note that:
margin:0px 0px 0px 0px; or margin:0 0 0 0; is the same as margin:0;.


Using * in the implementation will remove margins from all the elements such as div tags and also UL tags which might result in reducing the indentation in the latter case so it is always advisable to use the tagname or a specific classname when u apply zero margins.
mariohs
varun_dodla wrote:
Using * in the implementation will remove margins from all the elements such as div tags and also UL tags which might result in reducing the indentation in the latter case so it is always advisable to use the tagname or a specific classname when u apply zero margins.

That's why I warned him about removing it from all elements and start styling the site from scratch Wink
a_dubDesign
mariohs wrote:
varun_dodla wrote:
Using * in the implementation will remove margins from all the elements such as div tags and also UL tags which might result in reducing the indentation in the latter case so it is always advisable to use the tagname or a specific classname when u apply zero margins.

That's why I warned him about removing it from all elements and start styling the site from scratch Wink

Thats always the first thing into my css files. Browsers are sketchy enough across the board, and if your going for pixel perfection cross browsers, leaving the margins and paddings up the browser can mean bad news.
Reply to topic    Frihost Forum Index -> Scripting -> Html, CSS and Javascript

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2007 Frihost, forums powered by phpBB.