View Full Version : css border/background
11-21-2009, 05:43 PM
I'm trying to apply a background/border to a page. The site is at forsythproducedirect.com, and i'm trying to apply a similar background to pauleys.co.uk, minus the top green 'bar', so it'll just be running up the sides with the space behind the content still white.
Does anyone have any idea how i'd go about it?
I'd really appreciate any help! Cheers, Graeme :)
11-21-2009, 05:58 PM
You have a body tag in style.css and another in style1.css. It might save some confusion if you combined those.
If you add the following line highlighted in red to the body tag in style1.css, that same background will load on your page -
background: url(http://www.pauleys.co.uk/templates/pauleys/images/main_background.gif) repeat-x;color:#848484;
background: #fff url(../images/skin1/bg.jpg) no-repeat 0px 0px;
border-right:1px solid #dadada;
After that, you'll give your page a color so you don't see the gradient behind it. Like this -
Some padding to move the text away from the edges might be nice too.
11-21-2009, 09:36 PM
Thanks a million mate! :)
I'm having a few sizing issues with the background. Obviously each page differs in height depending on the content. On the homepage, the background repeats itself, whereas on other pages it fits fine. Can you think of any solutions?
Again, your help is seriously appreciated mate, i had been stuck on this for a while and you've really helped me out! :)
11-21-2009, 10:31 PM
Make it repeat on the x axis only. By not specifying, it repeats on x and y both by default.
Like this -
background: #398212 url(http://forsythproducedirect.com/wp-content/uploads/2009/11/forsythbackground.png) repeat-x;
I didn't pick a very close matching color but the #398212 gives it a color for the part of the body that is not covered with forsythbackground.png.
11-21-2009, 11:05 PM
Excellent mate, thanks a million! :) I doubt there is, but if theres anything i can do to return the favour just let me know.
Powered by vBulletin® Version 4.2.2 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.