Stretch Background with CSS

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

pyritechips

Thread Starter
Gone but Never Forgotten
Joined
Jun 2, 2002
Messages
26,907
First Name
Jim
Hello!

Another newbie question about HTML. I used CSS code to have a stationary background. It sits still like a wallpaper and the text scrolls down above it- very nice!

Problem is, my friend TW56 has 1024x748 display and he says the background doesnt fill his screen. Is that because I wrote the code in 800x600? is there any way around this? Can I stretch it so everybody sees a full background?

This is the code I used:

< style type="text/css">
body
{
background-image:
url("ivybridge800.jpg");
background-repeat:
no-repeat;
background-attachment:
fixed
}
</style >
 
B

Balzac

Your background image is a fixed size and set to no repeat. If it's an image that can be repeated without looking weird you can set it to repeat. Otherwise you can use javascript to expand and contract the image to fill the browser's background. Of course this will pixelate the image depending on how large the image is to start with.

http://www.webreference.com/dhtml/diner/bgresize/
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Staff online

Members online

Top