NameSilo

Background Image...

Spaceship Spaceship
Watch

DJ_Guvana

Account Closed
Impact
0
Hi all

I created a background image. ( 30x700 ) With a gradient on it, so it repeats and looks like the backgrounds fading, but it also repeats downwards, and spoils it, is there anyway to make the background image fit perfect?

Regards
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
Use cascading stylesheets to set your background. Add this code to the body or what ever element you want the background in.

Code:
<body style="background-image:"image.jpg";background-repeat:repeat-x;">

That should solve your problem.
 
0
•••
DJ_Guvana said:
Hi all

I created a background image. ( 30x700 ) With a gradient on it, so it repeats and looks like the backgrounds fading, but it also repeats downwards, and spoils it, is there anyway to make the background image fit perfect?

Regards
do you mean you want to stretch your picture on the page? You can't do that, but what you can do is make the gradient biger, so it is as high as a standard page, then put this in the head section of your site:

Code:
<style>
body{
background-image: url('##PATH TO IMAGE HERE##');
background-repeat: repeat-x;
background-attachment: fixed;
}
</style>
Have a look at the effect that produces, it is probably the nearest you will come, without using layers, which is very complicated (i think anyway)

Tom
 
0
•••
Using "repeat-x" or "repeat-y" in the CSS will make the background repeat in only that direction.
 
0
•••
0
•••

We're social

Unstoppable Domains
Domain Recover
DomainEasy — Live Options
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back