CSS/XHTML page border

F

Feliks Dzerzhinsky

I can find a million examples of how to put a border around a paragraph, but not one on putting a border color around the entire page.

I am trying to make a page that uses very few graphics a bit less drab. all I want is 30 to 40px around the border to be a different color from the background. It will be XHTML strict, so I have to play in CSS for this. A clue or a URL with an example will be appreciated.

TIA
 
F

Feliks Dzerzhinsky

I can find a million examples of how to put a border around a paragraph, but not one on putting a border color around the entire page.

I am trying to make a page that uses very few graphics a bit less drab. all I want is 30 to 40px around the border to be a different color from the background. It will be XHTML strict, so I have to play in CSS for this. A clue or a URL with an example will be appreciated.

I should add, that I realize I can put the content in a table, but wanted to know if there was a better way.
 
N

Neal

I can find a million examples of how to put a border around a paragraph,
but not one on putting a border color around the entire page.

I am trying to make a page that uses very few graphics a bit less drab.
all I want is 30 to 40px around the border to be a different color from
the background. It will be XHTML strict, so I have to play in CSS for
this. A clue or a URL with an example will be appreciated.

TIA

Ought to work:

body {border: 30px solid olive; width: 100%;}

Note that this won't stretch to the bottom chrome unless the content does.
 
F

Feliks Dzerzhinsky

Ought to work:

body {border: 30px solid olive; width: 100%;}

Note that this won't stretch to the bottom chrome unless the content does.

Thanks. That was what I needed.

body {
background-color: #A44A32;
border: 30px solid black;
width: 93%;
}

I did wind up putting the content in a table which allows me to insure that the bottom border is where I want it, as well as putting text on another background that doesn't hurt the eyes.
 
M

Mark Parnell

I can find a million examples of how to put a border around a paragraph,
but not one on putting a border color around the entire page.

html {background-color: red; padding: 35px;}
body {background-color: white;}
 
J

Jim Higson

Feliks said:
I should add, that I realize I can put the content in a table, but wanted
to know if there was a better way.

Probably, depending on the content of the site.
For most purposes divs should provide smaller, nicer code.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top