What's new
Photoshop Gurus Forum

Welcome to Photoshop Gurus forum. Register a free account today to become a member! It's completely free. Once signed in, you'll enjoy an ad-free experience and be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

How to create a static background


cptrainer01

Member
Messages
9
Likes
0
I want to place a static background image that will fill the browser window and be centered. This is what the site looks like now.
TechsupportforBKGRD.jpg

I want it to look similar to this:
oliver.jpg
 
a background like the examples you give is pretty easy to do. Basically it's just a one pixel wide image, top to bottom. Just specify it as a background for <body> and added repeat along the "x" axis. then specify a background colour which is the same colour where the image ends.

So in your example it goes from dark blue to light blue. The background colour sits below the background image. Where the image ends the background colour kicks in. If you give it the same colour as the last pixel (lowest) of the image then the transition between the image and the background colour will be seamless.

The CSS would look something like this:

body {
background: #09F url(images/background.gif) repeat-x;
}

cheers

Chris
 
good to hear it worked!

Usually you do not need to add "top centre" or "fixed". These are assumed. However without seeing the rest of your CSS I cannot really comment. The sample I posted was the cleanest and simplest way to do it in an empty CSS file. If you add a couple of rules and that works for you, that's fine. CSS always works as a whole, it's difficult to just paste in one line without knowing where it gets pasted and seeing the rest of the CSS. So you probably did the right thing :)

cheers

Chris
 
good to know - i always wanted to change that at my site, but didn't dare to change css codes... thank you!
 
thank you sir to share such a great and help full information, i really like it and i find it very help full, keep it up
 

Back
Top