joseph
joseph

Reputation: 767

How to make a border in css that is actually on the very edges

I'm trying to make a CSS border that is on the very edge of the page. So far I have:

body{ 
color:#008000;
background-color: blanchedalmond;
border: 5px solid #000080;
}

This does create a border, however, between that border and the sides, top, and bottom, of my browser, there's another small area [equal size for all sides] that is just the background color of the page. I want this area to go away. I'm using Chrome, by the way.

Upvotes: 1

Views: 536

Answers (4)

adlawson
adlawson

Reputation: 6431

I'm guessing it's the body margin, that is unless that isn't your complete css

body {
    margin:0;
    padding:0;
}

Upvotes: 1

Jason Gennaro
Jason Gennaro

Reputation: 34855

Try this...

body{ 
color:#008000;
background-color: blanchedalmond;
border: 5px solid #000080;
margin:0;
padding:0;
}

Upvotes: 2

Hristo
Hristo

Reputation: 46467

Try removing the padding/margin if it exists...

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

I hope this helps.

Upvotes: 1

icktoofay
icktoofay

Reputation: 128991

Try something like this, as well:

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

Upvotes: 1

Related Questions