Mark Ma
Mark Ma

Reputation: 1362

set distance between div and browser border?

when I use static or relative position,there is always about 5 pixel white space between the div element and the browser window border.following is my code

#top{
  background:#011961;
  height:75px;
  color:white;
}

I want to set the distance between the div element and the browser window border to 0 using static or relative position,but not fixed or absolute position.

Is it possible? any suggestion is appreciated.

Upvotes: 0

Views: 1948

Answers (1)

meder omuraliev
meder omuraliev

Reputation: 186662

Use a universal reset..

* { margin:0; padding:0; }

There's usually margin/padding on the body element which creates that space, this'll explicitly set it on all elements. Another alternative if you care about leaving form controls as they are is to use a reset.css.

Upvotes: 2

Related Questions