Fixed layout width based on browser window width

Discussion in 'HTML' started by msswasstastic@aol.com, Jan 27, 2005.

  1. Guest

    Microsoft.com is currently serving one of two fixed width layouts and
    graphic sizes based on browser width, and not screen res redirection.

    I've looked at the code and I can't quite figure out how they are doing
    this.


    It would appear as if they are loading the smaller image, and then
    loading the larger image over it if there is room in the browser
    window. Cut from their code.....

    <img src="/h/en-us/i/ts_800_5_ExperienceMoreB.jpg" alt="Have more fun
    with Windows XP" class="hhalf" usemap="#ThreePanelMap_One">
    <!-- -->
    <script
    type="text/javascript">wI("/h/en-us/i/ts_1024_5_ExperienceMoreB.jpg","Have
    more fun with Windows XP","W","#ThreePanelMap_OneW")</script>

    I can't find other code there related to this though, but I'm not the
    best with Javascript.
    , Jan 27, 2005
    #1
    1. Advertising

  2. Toby Inkster Guest

    wrote:

    > I've looked at the code and I can't quite figure out how they are doing
    > this.


    Here 'tis.

    <script type="text/javascript">
    var isW;
    isW = (
    document &&
    document.body.clientWidth &&
    document.body.clientWidth>=895 &&
    document.getElementById
    );
    </script>

    And towards the end of the page there's an if(isW){...} that changes a few
    styles.

    It's pretty annoying though -- if you resize your browser half way through
    reading the page, it doesn't switch to the wider view.

    Not very difficult -- I've used similar code to do a survey of browser
    widths before.

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me ~ http://tobyinkster.co.uk/contact
    Toby Inkster, Jan 27, 2005
    #2
    1. Advertising

  3. Toby Inkster wrote:
    > Not very difficult -- I've used similar code to do a survey of

    browser
    > widths before.


    And the results of the survey are...

    --
    -=tn=-
    Travis Newbury, Jan 27, 2005
    #3
  4. Guest

    Travis Newbury wrote:
    > Toby Inkster wrote:
    > > Not very difficult -- I've used similar code to do a survey of

    > browser
    > > widths before.

    >
    > And the results of the survey are...
    >


    Browsers have width.

    --
    Hywel
    , Jan 27, 2005
    #4
  5. homer Guest

    > Browsers have width.
    > Hywel



    State Purchasing Webmaster, mainly due to printing concerns, we use pixel
    width set at 750max, aligned center or left.

    I personally always use 100% width, ALWAYS, which auto resizes, for my own
    personal use, not really concerned with printing contracts and documents.

    home
    homer, Jan 27, 2005
    #5
  6. Toby Inkster Guest

    Travis Newbury wrote:

    > And the results of the survey are...


    Most people surf with their browser maximised, but it's not an
    overwhelming majority -- more like about 55%. After that about 30% of
    people have their browser set at roughly 75%-85% of screen width. A
    few people (about 5%) have their browser 85%-99% of screen width and the
    other 10% have their browser at less than 75% width.

    Interestingly, this didn't vary much based on total screen size.

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me ~ http://tobyinkster.co.uk/contact
    Toby Inkster, Jan 27, 2005
    #6
  7. Karl Core Guest

    "Toby Inkster" <> wrote in message
    news:p...
    > Travis Newbury wrote:
    >
    >> And the results of the survey are...

    >
    > Most people surf with their browser maximised, but it's not an
    > overwhelming majority -- more like about 55%. After that about 30% of
    > people have their browser set at roughly 75%-85% of screen width. A
    > few people (about 5%) have their browser 85%-99% of screen width and the
    > other 10% have their browser at less than 75% width.
    >
    > Interestingly, this didn't vary much based on total screen size.
    >


    Good info. Thanks for this


    --
    -Karl Core
    Please Support "Project Boneyard":
    http://www.insurgence.net/info.aspx?action=band&item=boneyard
    Karl Core, Jan 27, 2005
    #7
  8. Toby Inkster wrote:
    > Most people surf with their browser maximised, but it's not an
    > overwhelming majority -- more like about 55%. After that about 30% of
    > people have their browser set at roughly 75%-85% of screen width. A
    > few people (about 5%) have their browser 85%-99% of screen width and the
    > other 10% have their browser at less than 75% width.
    > Interestingly, this didn't vary much based on total screen size.


    Very interesting results, I wonder how this compares with other similar
    studies?

    --
    -=tn=-
    Travis Newbury, Jan 27, 2005
    #8
  9. Mark Parnell Guest

    Previously in alt.html, Travis Newbury <> said:
    > Toby Inkster wrote:
    >> browser widths

    >
    > And the results of the survey are...


    Irrelevant. :)

    --
    Mark Parnell
    http://www.clarkecomputers.com.au
    Mark Parnell, Jan 27, 2005
    #9
  10. Toby Inkster Guest

    Travis Newbury wrote:

    > Very interesting results, I wonder how this compares with other similar
    > studies?


    I don't know of any similar studies.

    PS: I took the samples from four different sites over a period of several
    weeks.

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me ~ http://tobyinkster.co.uk/contact
    Toby Inkster, Jan 27, 2005
    #10
  11. Toby Inkster wrote:
    > Travis Newbury wrote:
    >
    >
    >>Very interesting results, I wonder how this compares with other similar
    >>studies?

    >
    >
    > I don't know of any similar studies.
    >
    > PS: I took the samples from four different sites over a period of several
    > weeks.
    >

    how did you measure this? can you read out window sizes from stats? and
    how do you know what the maximum available screen resolution is? that's
    quite amazing as most people I know have their browser windows always
    maximised...

    --
    www.daszeichen.ch
    remove nixspam to reply


    ----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
    http://www.newsfeeds.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
    ---= East/West-Coast Server Farms - Total Privacy via Encryption =---
    Bernhard Sturm, Jan 28, 2005
    #11
  12. Toby Inkster Guest

    Bernhard Sturm wrote:

    > how did you measure this? can you read out window sizes from stats?


    As I posted earlier, I used document.body.clientWidth.

    > and how do you know what the maximum available screen resolution is?


    I used screen.width.

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me ~ http://tobyinkster.co.uk/contact
    Toby Inkster, Jan 28, 2005
    #12
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. johnp
    Replies:
    4
    Views:
    3,652
    Toby Inkster
    May 23, 2005
  2. ppcguy
    Replies:
    3
    Views:
    1,234
    Toby Inkster
    Aug 26, 2005
  3. Guybrush Threepwood

    Table-based layout to CSS layout

    Guybrush Threepwood, Jun 6, 2006, in forum: HTML
    Replies:
    20
    Views:
    978
  4. Replies:
    1
    Views:
    557
    John Timney \(MVP\)
    Jun 19, 2006
  5. HP
    Replies:
    3
    Views:
    409
    Ben C
    Mar 9, 2007
Loading...

Share This Page