PDA

View Full Version : Site changes res. according to user settings?


Natalie79
01-27-2006, 11:18 AM
I’ve just read oneeyebrow's (http://codingforums.com/showthread.php?t=77617) post about window resizing according to a surfer’s resolution… I didn’t quite understand what he meant but I would guess that he might have been asking if there is a way to have your website adapt to the user’s browser settings and resolution once that users visits your site.

Funny enough I was just on my way to ask this question then I spotted his post. I’m pretty sure I’ve visited a few websites (decades ago) that once entering the main page, the site would reload itself according to the resolution of my screen (once being 800X600 until I got out of that shoe-box phase)… then noticed when visiting that same site at work the artwork and graphics where much larger, adapting to the larger resolution of the screen.

SO… how does that work? ;)


One guess I have is that the designer rendered the sites design into separate sizes, then using some kind of code that determines the current visitor’s resolution upon entering the site to upload the design that best suits that user’s settings… if only I could remember which sites had that option I’d go back and find the source :confused:

-Nat

ronaldb66
01-27-2006, 12:52 PM
Natalie,

Sites can be made to adapt to the available window width by using relative (percentage) measurements for the widths of the various sections; this is called a liquid or fluid layout.

Neither window size sniffing, nor scaling graphics should be considered as desirable options to make the design, too, adapt; there are several techniques using CSS (Cascading Style Sheets) to implement an adaptive graphic design to a liquid layout, but it goes to far (and I don't have that sort of time) to go over them here and now.

Natalie79
01-27-2006, 02:19 PM
[QUOTE=ronaldb66]
Neither window size sniffing, nor scaling graphics should be considered as desirable options to make the design[QUOTE]

That said, i take it that people don't go through the trouble, after all as i mentioned above, i've come across very few websites that go through that sort of trouble.

Thanks anyway for the reply.

- Nat

kaiiak
01-27-2006, 02:57 PM
i was gonna ask a similar question but then saw this...

so basically i have a middle strip of content and then like 2 inches of background colour eitherside.....

when i say put my favourites bar in IE it squishes the right hand side.... so if theres no content... it just gets rid of it instead of making scrollbar....

but the bit on the left where there is just background remains....

how would i get it so the content bit stays in the middle of page no matter what width it is....

do i have to seperate background from the background of content and make it a div....?:confused: then use align="center".....:confused:

ronaldb66
01-27-2006, 03:46 PM
Kaiiak,

This Q & A in the FAQ may answer your question:

http://www.codingforums.com/showthread.php?p=182254#post182254

kaiiak
01-27-2006, 06:35 PM
thanks....

i had i ago but it didnt work....

i still get the bit on the left of my content staying there no matter what size i make my IE browser box...

im using:-

body {
font: 10pt/14pt arial;
color:#000000;
background: url(./images/background.jpg) no-repeat top left;
padding: 0px;
margin: 0px;
width:100%;
text-align: center ;
}


#e { margin: 0 auto; text-align: left }

<html>
<head>...</head>
<body>
<div id="e">content</div>
</body>
</html>


like on the msn website.. when u clik ur favourites the gaps either side of middle gets squished instead of just everything shifted to the right......