Results 1 to 2 of 2

Thread: Positioning Issues + Browser Sizes

  1. #1
    Join Date
    Dec 2006
    Location
    Singapore
    Posts
    74

    Post Positioning Issues + Browser Sizes

    Hi. I'm wondering if anybody can aid me on changing positions for various browser sizes. What I'm hoping to do is that for my particular element, I want it to be at 15% from left, and 10% from top, for 800 X 600, at 20% from left, and 15% from top for 1024 X 768 etc etc.

    Thanks!

  2. #2
    Join Date
    Feb 2006
    Location
    Salisbury UK
    Posts
    4,332
    You need to use a javascript sniffer to find the screen resolution and then use different stylesheets for the different resolutions.

    Google: screen resolution detection javascript.

    This is one link I looked at:-
    http://www.pageresource.com/jscript/jscreen.htm

    The example sends the viewer a different html PAGE if he has a small or large screen resolution but different code can also divert to a different stylesheet from the same page.

    Ask on the javascript board how to code it properly.

    Remember that it will tell you what screen resolution a viewer's browser is set at but not what window size he is using. He may have a screen resolution of 1280*1024 but always use a smaller window. People with 1600*1200 resolutions often split their screens vertically into two 800px wide windows.
    Code downloaded to my PC will be deleted in due course.
    WIN7; IE9, Firefox, Opera, Chrome and Safari for Windows; screen resolution usually 1366*768.
    Also IE6 on W98 with 800*600 and IE8 on Vista 1440*900.

Similar Threads

  1. Internet Explorer Browser Issues
    By mattmilam in forum Web Design, HTML Reference and CSS
    Replies: 1
    Last Post: 14 Feb 2007, 11:42 AM
  2. js-compressing/expanding layout on browser resize and 2 more issues
    By sanchopansa in forum Client & Server Side Scripting (PHP, ASP, JavaScript)
    Replies: 0
    Last Post: 22 Jul 2006, 04:03 PM
  3. Replies: 0
    Last Post: 07 Mar 2006, 12:14 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •