By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,785 Members | 1,079 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,785 IT Pros & Developers. It's quick & easy.

Adapt to screen

P: n/a
MSE
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.
Jul 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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.
Jul 20 '05 #2

P: n/a
MSE wrote:
How can I make a website that adapts to the screen resolution?
By not interfering with the web browser's inherent ability to adapt
the content to the user's environment. It really is quite easy, but so
many authors just can't help themselves, and throw up all sorts of
obstacles, and then add even more complexity to overcome those obstacles.
I would also like to include a picture that stretches when the
screen res. increases, if you know what I mean.


See the thread "Dynamic resizing of figures and images (supporting
traditional typography)" in ciwa.stylesheets for some interesting ideas.

--
Brian (remove ".invalid" to email me)

Jul 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.