473,387 Members | 1,515 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Adapt to screen

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
2 5528
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: dcrespo | last post by:
I would like to adapt the PyShell code completion to DrPython, because both programs are very good... Any clue for start finding the code location in both programs to accomplish this? Thanks
2
by: Steve Holden | last post by:
I'm trying to copy data from an Access database to PostgreSQL, as the latter now appears to work well in the Windows environment. However I'm having trouble with date columns. The PostgreSQL...
0
by: Jaco | last post by:
Hey, I can determine the resolution of my screen. But how can I resize all my controls (the whole form) to the specified resolution. Do I have to write for each possible resolution a special...
0
by: Jeffery Tyree | last post by:
I have a machine that will be used to demo some Excel spreadsheets at a convention. Because I did not author the spreadsheets and attendees will be allowed to play with the spreadsheets, I needed...
2
by: Gustaf | last post by:
I read some data from an XML file. Some datas need to be converted to decimals. The program is to be used in any country, so sometimes the decimal sign is "." and sometimes ",". How can I make...
3
by: Peter Oliphant | last post by:
I'm programming using MS VS VC++ 2008 Express (Beta 2) in /Cli pure mode. I've found the Screen class. With it I can very easily get the count and all the data on the various Screens attached to...
1
by: nasima khan | last post by:
Hi, i am nasima. I have got a code for setting the screen resolution of my page, but i am unable to understand. Can any one give a complete data explanation of the below code. Sub ChangeRes(X...
0
Shashi Sadasivan
by: Shashi Sadasivan | last post by:
Hi All, i Have an application functionaluty which has 4 forms which are needed to interact by the user by dragging data from these forms to one another the main form is located in the MDI Parent...
6
by: freerider2007 | last post by:
Hi! I have a HTML table which width will vary (since it's dynamically built). Above the table I want to align a select box with the table's right edge. A simple solution is to add an extra...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.