Creating website background with gradient?

Soldato
Joined
1 Sep 2005
Posts
10,001
Location
Scottish Highlands
Is it possible, and what is the best way to create a website background with a gradient. And to be awkward, I ideally would like the gradient to go corner to corner and include pinstriping. Any ideas?
 
You could use background-repeat. http://htmldog.com/reference/cssproperties/background-repeat/

You have an image that is say 1 or two pixels wide by a few hundred tall and then repeat that across. Or have an image 1 or 2 pixels tall and however wide and repeat it down.

I think this is done so you have just one small image to have loaded and the browser can then repeat it for you. :)

wont work with a full page diagonal gradient. He said corner to corner.
 
Ok cheers guys, thought as much. How about a gradient running down the page? I know it can be done with the way you have posted MarcLister, but when happens if you say make that gradient 800px tall and 1px thin, but then the content stretches the page over 800px tall. Won't it look weird? Is there a way to get around this?
 
So the gradient will be 800px tall but the content itself will be taller? The gradient will just stop and you'll see the background colour of the page I believe.
 
Ok cheers. Ive just thought though, I could have the background as a static image and have only the content scroll. That would work I recon. Hmm, ideas ideas.
 
what i suggest is have it go to a solid colour at the bottom, which is the same as the background colour of the page. Does this make sense?

EDIT: Arrgh! You quick posting poo! :p
 
Cheers folk, thats the shinizzle in after. Im just having a play around with a totally different colour scheme at the moment. Decided against going for the pink you used shifty_uk. :D
 
Back
Top Bottom