Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 9 of 9
  1. #1
    New Coder
    Join Date
    Feb 2003
    Location
    Oregon, USA
    Posts
    28
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Developing for 800x600 & 1024x768

    I have a web site that is getting quite indepth. The site is originally setup for 1024x768. About 5-10% of my visitors use 800x600, so I have developed 2 sides: 1-800x600 & 1-1024x768.

    With that in mind, I have the enter page check the vistor's resolution and then it sends them to the appropriate side of the web site.

    I don't want to keep duplicating code for each side. I could just setup the site for 800x600, but with the frames it looks so much better in the higher resolution.

    Is there an easy way to have the browser check the resolution (which it is currently doing) and have it scale the frames, images, and text to match?

    The site is www.bbtaekwondo.com.

    Nick
    If you want to be the best, you have to work harder than the best.

  • #2
    Regular Coder
    Join Date
    Sep 2002
    Location
    Louisiana
    Posts
    576
    Thanks
    0
    Thanked 0 Times in 0 Posts
    do you know javascript, this would take a little code on all of your pages and images and frame, to get the resolution in javascript:
    <script type="text/javascript">
    width = screen.width;
    height = screen.height;
    </script>
    then you will have to make the images respectively like this

    <img src="blah.jpg" height="height/3" width="width/3">

    that would make the image 1 third of the width of the page and 1 third the height of the page (kind of big i know). the same holds true for frames and such.

  • #3
    Rockstar Coder
    Join Date
    Jun 2002
    Location
    USA
    Posts
    9,074
    Thanks
    1
    Thanked 328 Times in 324 Posts
    You also could use percentages on your tables so its dynamic based on the available screen size.
    OracleGuy

  • #4
    New Coder
    Join Date
    Feb 2003
    Location
    Oregon, USA
    Posts
    28
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I do know javascript and that is how I'm getting their screen resolution. I have been using the formula of 800x600 is %78 of 1024x768.

    That doesn't fix the text size, of course. I guess I could probably use style sheets for most of the rest. Either way, it looks like quite a bit of work ahead of me.

    I was just hoping there might be something out there that I hadn't seen yet.

    Nick
    If you want to be the best, you have to work harder than the best.

  • #5
    Rockstar Coder
    Join Date
    Jun 2002
    Location
    USA
    Posts
    9,074
    Thanks
    1
    Thanked 328 Times in 324 Posts
    Perhaps you misunderstood me, I ment use percentages as in you do something like this:

    <table width="80%">

    Where the table is 80% of the available screen size, and the text of course will auto wrap to fit the table size.

  • #6
    New Coder
    Join Date
    Feb 2003
    Location
    Oregon, USA
    Posts
    28
    Thanks
    0
    Thanked 0 Times in 0 Posts
    No, I did catch that. With some of the text, it needs to fit on one line. I do use percentages for some of my tables. It will work with most of the page.

    I think I just need to go back through and redesign some of the pages. We were in such a hurry to get the page up and going that I used didn't spend as much time in the design and layout phase that I should have. Now I'll pay for it in the extra time. But, that's human nature for you - LBN (lazy by nature).

    Hmm, percentages for my tables and images and style sheets for my fonts should work if I do it right. Call my function in an onload statement to determine which css to use.

    Thanks for the help. Sometimes you just need to talk (or type) outloud to work it out in the mind, at least for me. Although I've had a few friends laugh at me because I talk to myself while I'm working on things.

    Nick
    If you want to be the best, you have to work harder than the best.

  • #7
    New Coder
    Join Date
    Aug 2002
    Posts
    85
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Originally posted by chrismiceli


    <img src="blah.jpg" height="height/3" width="width/3">

    will this work for any image? if i am linking an image that is hosted on another site, but wanted it to be smaller when
    viewed on my site, can i just enter that in the code?

  • #8
    Rockstar Coder
    Join Date
    Jun 2002
    Location
    USA
    Posts
    9,074
    Thanks
    1
    Thanked 328 Times in 324 Posts
    It should.
    OracleGuy

  • #9
    Regular Coder
    Join Date
    Jun 2002
    Location
    UK
    Posts
    577
    Thanks
    0
    Thanked 0 Times in 0 Posts
    wouldn't you have to document.write() in every image tag though?
    surely the html <img tag wouldn't recognise the defined javascript variable height, let alone the division operator.
    Ökii - formerly pootergeist
    teckis - take your time and it'll save you time.


  •  

    Posting Permissions

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