CSS Page Border

  • 1
  • Question
  • Updated 9 years ago
  • Answered
Hi there i wish to put an entire page border round my page using css and it kind of works but when I change the margins the border wont move closer in from left and right and also the top, any help achieving this would be appreciated. The code I have used is: -

<!-->
<style type="text/css"> body { margin: 15; padding: 0; border: 1px solid #cccccc; } </style>
<-->

Thanks
Craig
Photo of Craig

Craig

  • 449 Posts
  • 11 Reply Likes

Posted 9 years ago

  • 1
Photo of Sanja

Sanja, Official Rep

  • 10698 Posts
  • 495 Reply Likes
Hi Craig

Can you please let me know what style you are using? Thanks. I believe I may have a fix for you.
Photo of Craig

Craig

  • 449 Posts
  • 11 Reply Likes
Hi Sanja,

I believe I am using clean slate!
Photo of Sanja

Sanja, Official Rep

  • 10698 Posts
  • 495 Reply Likes
Hi Craig

Try this:

<style type="text/css">
.container {
width: 900px;
margin: 0px auto;
border: 1px solid #cccccc;
}

.sys_footer{
margin-left: 5px;
margin-right: 5px;
text-align:right;
font-size:small;
border-top:solid 1px #FFFFFF;
}

</style>

I added the footer workaround because on the CleanSlate template, there is a thin grey line which doesn't look good with the border around it. So, I removed this.

Let me know if you have any problems with this.