I need to figure out how to make a background picture completely fill the screen with the full picture on any computer screen. Weather it's being viewed on a 17 inch monitor or a 12 inch monitor I need the picture in the background to be the same size. I've tried manipulating the size of the picture in photoshop but that doesn't work as well.

Recommended Answers

All 3 Replies

Are you using CSS?

Do you want to post the code you are using.

Hi there,

If you only want to use CSS to get the background image to fit the entire screen, you could try something like this.

#img {
width:100%;   
height:auto;
max-width:999px;   
max-height:999px;    
}

Changing the 999's into the width and height of the original picture accordingly.

What I do not quite understand; you "need the picture to be the same size" on any resolution? Do you mean full screen or a certain percentage of the screen?

Traevel

How do i stretch my background image?

You can't!

W3C doesn't give you any means to manipulate background image dimensions.

The only browser providing means for this is still IE 5++

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.