473,587 Members | 2,459 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 5539
On 3 Jun 2004 07:41:55 -0700, MSE <ma*******@blue zone.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.stylesheet s 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
1315
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
5261
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 table receiving the data has the following definition: CREATE TABLE Lines ( LinID SERIAL PRIMARY KEY, LinDate TIMESTAMP(0), LinQty INTEGER,
0
1402
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 function? Is there somebody who can give me a hint or maybe some articles or some keywords to search. What to do with the DPI? I have also to take into consideration that some PC's have increased/decreased there fontsize.
0
3265
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 a way to periodically restore the original versions. In addition to the "always-on-top click this button to reset demo" application I wrote, I chose to use screen saver code to reset the demo after a period of inactivity in the event an attendee...
2
3940
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 Convert.ToDecimal() adapt to the user's language settings? Assume Windows XP and .NET Framework 1.1. Gustaf
3
1472
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 a system, whether it be a single screen or multiple screen system. I believe the FromControl method of the Screen class can be used to determine which Screen a Form is on. But I can't find how I can place or move a Form onto the Screen of my...
1
2495
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 As Long, Y As Long, Bits As Long) Dim DevM As DEVMODE, ScInfo As Long, erg As Long, an As VbMsgBoxResult 'Get the info into DevM erg = EnumDisplaySettings(0&, 0&, DevM) 'This is what we're going to change DevM.dmFields =...
0
4566
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 and the rest are on their respective screen (3 other secondry screens) At the moment i am testing using 2 screens but i get a very similar behavious when i run it on a 4 screened system. For the 2 screen system: form1 opens in primary screen (ie...
6
8887
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 row (and use colspan) and put the select box there. Is it possible to solve the problem using a container DIV and CSS?
0
8219
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
7978
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8221
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6629
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
5722
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5395
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3845
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2364
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
1192
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.