Background Image...

Namecheap AuctionsNamecheap Auctions
SpaceshipSpaceship
Namecheap AuctionsNamecheap Auctions
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
Close
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
Close
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
Close
Using "repeat-x" or "repeat-y" in the CSS will make the background repeat in only that direction.
 
0
Close
0
Close
AIVikingsAIVikings

We're social

Escrow.com
Spaceship
Domain Recover
CryptoExchange.com

NamePros updates

Switch between accounts
You can now stay logged in to more than one NamePros account in the same browser. Click your avatar, then "Accounts in this browser", to...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back