Reputation: 31
I want to set a prefereble image as the background for my website.
Now, an image file always comes with a fixed pixel or size. Lets say that my chosen image is 960x960 px. But my web page may have different size, may be the size is 3 times bigger than the image.
If I set that image as background, then normally it will repeat (I know how to stop it, but that's not what I want). When it gets repeated, it will make a stripe or a shadow type line at that point where they join with each other. That means, at the image joining point, it makes a separate border (I hope you know what I mean) what looks bad and an user doesn't like it.
How to avoid that?
How can I set a background image as only a single image so that it's not clearly visible that many images are joint on the background.
As an example this is my background image:
background-image:url(img/backgr.gif);
Upvotes: 0
Views: 1592
Reputation: 505
After the background-image line have this line:
background-repeat: no-repeat;
Upvotes: 1
Reputation: 3953
Two possibilities:
background-size:cover;
to enlarge the background image so it automatically covers the whole screen.Upvotes: 2