On 3 Jun 2004 07:41:55 -0700, MSE <ma*******@bluezone.no> wrote:
How can I make a website that adapts to the screen resolution? I would
also like to include a picture that stretches when the screen res.
increases, if you know what I mean.
Screen resolution does not equal viewport size. Understand this first. The
screen res is going to be larger than the viewport. How much larger
depends on the UA used, the sidebars in the browser, the sizing of the
browser on the desktop, etc.
Images have inherent sizes. If you attempt to stretch them, resolution is
lost. If you attempt to compact them, load time is larger. So,
essentially, what you are asking isn't really feasible without creating
more problems.
You can create a fluid design to your page where the design elements flex
to the user's viewport size. But images won't flex.
Some have considered some sort of "sniffing" to deliver an appropriate
image based on the screen resolution, but as the viewport is not
necessarily as large as the screen, this method fails.
Simply, there's no acceptable way to serve an image based on viewport
size, which is what you'd need to do in order to accomplish what you're
asking.