Stretched out image

Artashes

Administrator
Staff member
This question is directed at any web design gurus out there: how do you make a picture/image be so evenly stretched out (or simply embedded) into page's size like on this page:

http://www.microsoft.com/windowsvista/

The image is of perfect width and length... Also, is it possible to do so that the scroller won't be needed?

Best,
 
I know who he is but I don't know him personally, so I don't think it would be appropriate for me to bother him just to find out the answer. I am sure we have some users proficient enough to give a tip. :)
Thanks though!!

Best,
 
I'm no expert, but from what I can see, the background is not streched out at all. It's just a very wide image/picture (1400px). The part that doesn't fit the page is simply not shown. (I suspect this is simply how browsers work when it comes to backgrounds.)

http://www.microsoft.com/library/media/1033/windowsvista/images/wv_home_bkgnd_photo.jpg

I see they used CSS to position it so perfectly. the trick must be here:
#wvhpA
{
position: absolute;
top: 0px;
left: 0px;
width: 100%;
height: 440px;
z-index: 0;
background: url(/library/media/1033/windowsvista/images/wv_home_bkgnd_photo.jpg);
background-repeat: no-repeat;
}

http://www.microsoft.com/windowsvista/includes/wvhp2.css
 
Last edited:
Very cool find, Dan.

I think they make it so wide (1400px) is to satisfy the largest screen resolutions known to even most savvy tech users (in case they browse with 1400px width view).

In addition, they somehow make the picture sit in the background to satisfy most screen resolutions.

EDIT: I wonder whether there is a feature in Dreamweaver/FrontPage to accomplish the same for static sites without CSS.
 
Well, as Dan said, it's just CSS, with a wide image.

You can do the same with something like this:
Code:
<td style="background-image:url('images/image.jpg'); background-repeat:no-repeat; height:305px;">
 
Back
Top