Results 1 to 4 of 4

Thread: Putting Together vars depending on resolution

  1. #1
    Join Date
    Jul 2005
    Location
    Oregon, USA
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Putting Together vars depending on resolution

    Please help me.
    This is the oreginal.

    var lv_ch=new Array() //LV Center Header
    if (screen.height==480) lv_ch='15';
    else if (screen.height==600) lv_ch='17';
    else if (screen.height==768) lv_ch='19';
    else lv_ch='28';
    var ft_wd=new Array() //LV FoldSub Width
    if (screen.height==480) ft_wd[0]='136';
    else if (screen.height==600) ft_wd[0]='142';
    else if (screen.height==768) ft_wd[0]='150';
    else ft_wd[0]='200';

    How I wanted!
    I want to put them together.
    (Example below but it doesn't work)

    var lv_ch=new Array() //LV Center Header
    var ft_wd=new Array() //LV FoldSub Width
    if (screen.height==480)
    lv_ch='15'; ft_wd[0]='136';
    else if (screen.height==600)
    lv_ch='17'; ft_wd[0]='142';
    else if (screen.height==768)
    lv_ch='19'; ft_wd[0]='150';
    else
    lv_ch='28'; ft_wd[0]='200';

    I guest there's a way to do something like this, but I can't do it. If you can, please help me.

    Thank You

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Don't do it.

    You can't possibly anticipate every possible resolution, so don't try. A well-designed (relatively-sized) page will adjust itself to any resolution automatically. There should be no need for this.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  3. #3
    Join Date
    Jul 2005
    Location
    Oregon, USA
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I want to do it because I want different width & font-size on a differnet resolution. (I don't want the visitor with higher resolution setting see my menu to small.) That's the reason why I want it.

    Thank You!

  4. #4
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Quote Originally Posted by myself
    A well-designed (relatively-sized) page will adjust itself to any resolution automatically.
    This includes font sizes. I have nothing more to say on the matter.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

Bookmarks

Posting Permissions

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