42 users online (0 members and 42 guests)  


  Results 1 to 9 of 9

Related

  1. Replies: 5
  2. Screen resolution problem    Forum: HTML Forum
    Replies: 1
  3. Frames and Screen Resolution    Forum: HTML Forum
    Replies: 2
  4. Standardize Screen Resolution    Forum: HTML Forum
    Replies: 3
  5. Screen Resolution    Forum: HTML Forum
    Replies: 9
  1. #1
    frankarrow's Avatar
    New User

    Status
    Offline
    Join Date
    Jul 2002
    Posts
    5

    Question Determine screen resolution in HTML?

    Does anyone know of an easy way (without all kinds of strange vb script, java, etc.) how to determine the screen resolution of a client that is accessing your web server? Also do you know of a way or where I can learn how to adjust the fonts for my site based on the screen resolution of the client.

    Thanks ,

    Frank

  2. #2
    benzden's Avatar
    Senior Member

    Status
    Offline
    Join Date
    Feb 2002
    Location
    San Antonio, Texas
    Posts
    652
    HTML is a basic language used for display purposes. The other ones are those which can also talk to the computer itself. There are threads here (somewhere) with some answers to what you want - but not solely with HTML.

  3. #3
    HTML's Avatar
    Administrator

    Status
    Offline
    Join Date
    Aug 2000
    Posts
    3,445

    Follow HTML On Twitter Add HTML on Facebook Add HTML on Google+ Add HTML on Linkedin Visit HTML's Youtube Channel
    Hello Frank, welcome to the forums

    I know there is a javascript somewhere around these forums that will determine the viewers resolution, and feed the appropriate version. You mention changing the font, the page in your profile is an imagemap, thus knew images would need to be made for the various resolutions.

    Dave

  4. #4
    frankarrow's Avatar
    New User

    Status
    Offline
    Join Date
    Jul 2002
    Posts
    5

    Smile Thanks!

    Thank you for your input. I did find the javascript, but could not get it to work . What I did plan on doing was to create seperate pages with different size image maps that would be displayed based on the screen resolution of the client. After that initial image map most of the site uses tables and I wanted to have the text in those tables scale according to the screen resolution. I will keep plucking away to try and make it work. Thanks again for your help!

    Frank

  5. #5
    benzden's Avatar
    Senior Member

    Status
    Offline
    Join Date
    Feb 2002
    Location
    San Antonio, Texas
    Posts
    652
    ALthough I haven't used it and haven't looked at the insturctions for making image maps in years, don't image maps also accept percentages instead of physical coordinates?

    That would eliminate the need for separate configurations.

  6. #6
    ianru's Avatar
    Junior Member

    Status
    Offline
    Join Date
    Sep 2002
    Posts
    61
    What ya need is a counter, a counter will come how many people you have on your site and if you can find a goood one it will also tell you all that information


    NOTE: It will most likely be CGI, PHP or ASP

  7. #7
    jerryjensen1935's Avatar
    New User

    Status
    Offline
    Join Date
    Oct 2010
    Posts
    1

    Re: Determine screen resolution in HTML?

    Simple and you can do whatever you want with the variables returned (height, width). The "document.write" will print the data on the user's screen but you can use a form or such to get the data yourself.

    <SCRIPT language="JavaScript">
    <!--
    height = screen.height;
    width = screen.width;
    document.write( width + " x " + height);
    //-->
    </SCRIPT>

  8. #8
    antz's Avatar
    New User

    Status
    Offline
    Join Date
    Sep 2011
    Location
    Vancouver
    Posts
    1

    Re: Determine screen resolution in HTML?

    Based on the Javascript above. It determines the resoltuion of the screen well.
    I would appreciate it, if i could know how to enable that to change the webpage accordingly with the specific resolution on the page. I am working in Coldfusion and need the page to fit different resoltion sizes.
    Much appreciated

  9. #9
    rangana's Avatar
    Moderator/Allstar

    Status
    Offline
    Join Date
    Feb 2008
    Location
    Cebu City Philippines
    Posts
    317

    Re: Determine screen resolution in HTML?

    You can't apparently control the browser's dimension via the script unless it's a new page you opened via window.open();

    The best you can do is to do things right with CSS. Ensure that the container/wrapper of your elements is set in a fixed width so it won't get affected on any resolution size.

    Please take note that nowadays, there are smaller viewport like mobile browsers, so you might need to take that in consideration too.
    Checkout my porfolio.
    Please click the button when a member helped you.
    Take time to use Forum's Search function.



Tags for this Thread