Dynadot Black Friday and Cyber Monday 2026: save more on domains. See our sales.

Background Image...

SpaceshipSpaceship
Namecheap AuctionsNamecheap Auctions
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
CatchedCatched

We're social

Escrow.com
Spaceship
Domain Recover
CryptoExchange.com

NamePros updates

New: watch any domain
You can now watch domains on NamePros. We check each one and notify you when something changes. Search for a domain and press Watch on...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back