PDA

View Full Version : css border


markthedoc
04-21-2006, 03:09 PM
Hi

I'm using css to centre my website.

body {
text-align : center ;
min-width : 770px ;
}
div.wrapper {
text-align : center ;
margin-left : auto ;
margin-right : auto ;
}

However I want to put a 1px border around the whole page. The problem I've got is the left & right borders stretch to the edge of the browser window but I want them to stay firmly around my webpage.
any ideas how I could get around this.
Hope that makes sense :?
Cheers

domedia
04-21-2006, 04:00 PM
body {
text-align : center;
}
div.wrapper {
text-align : left;
margin-left : auto ;
margin-right : auto ;
width: 500px;
border: 1px solid red;
}

markthedoc
04-22-2006, 05:59 PM
body {
text-align : center;
}
div.wrapper {
text-align : left;
margin-left : auto ;
margin-right : auto ;
width: 500px;
border: 1px solid red;
}

That's great mate, cheers :D

domedia
04-22-2006, 06:52 PM
That's great Mark, get back here if you have any other problems with your CSS.