This is a CSS-Discussion group, javascript it is not.

A CSS method would be to use:

.container {
min-width: 780px; /* be nice to 800x600 */
max-width: 1250px; /* not stretch too much on hi-res */
}

and for IE6, since it doesn't understand min/max-widths...
inside your ie.css style sheet:

* html div.container {
   width: expression((documentElement.clientWidth < 780) ? "780px" : "auto"
);
}

I'm sure you can figure out how to use this expression and convert it for
max-width

peace,
G7W

On 3/26/07, n h <[EMAIL PROTECTED]> wrote:
>
> Hi, I'm new to the list and am looking for some
> (hopefully simple) javascript that detects the browser
> window width and then delivers one style sheet for
> window widths 900 px and smaller, and another style
> sheet for screens wider than 900 px (or whatever
> measurements are entered into the script).
>
> I searched through the archives and found a thread on
> this that had a link from "HTH-Mike" to a script that
> sounds like it is what I'm looking for, but the link
> doesn't work anymore:
>
> "I have a script that checks the window width, then
> serves up appropriate css for the monitor width. I
> design for 800x600, but have a backup css
> for 640x480.
>
> Instructions are located on a very colorful (ie ugly)
> page here:
> http://www.masadelante.com/css/template1JavaTest.htm";
>
> I'm hoping that someone has this script available
> somewhere else and could send me the link to it, or
> could post it here.
>
> thanks very much,
> shelly
>
>
>
>
>
> ____________________________________________________________________________________
> It's here! Your new message!
> Get new email alerts with the free Yahoo! Toolbar.
> http://tools.search.yahoo.com/toolbar/features/mail/
> ______________________________________________________________________
> css-discuss [EMAIL PROTECTED]
> http://www.css-discuss.org/mailman/listinfo/css-d
> IE7 information -- http://css-discuss.incutio.com/?page=IE7
> List wiki/FAQ -- http://css-discuss.incutio.com/
> Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
>
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7 information -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to