SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Member Ozz's Avatar
    Join Date
    Aug 2002
    Posts
    24
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Background image depending on screen resolution

    I have to use different background images for different screen resolutions.
    For example is visitors resolution is 800x600 he sees 800x600.jpg as background image on that page if its 1024x768 sees 1024x768.jpg.
    I dont want to redirect visitors to different pages.
    I think it can be done with javascript but how?
    Spare time terminator:
    Limk.com
    c:\internet.zip

  2. #2
    Web-coding NINJA! silver trophy beetle's Avatar
    Join Date
    Jul 2002
    Location
    Dallas, TX
    Posts
    2,900
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What if I have 1024x768 (or larger) but my browser isn't fullscreen? What then?
    beetle a.k.a. Peter Bailey
    blogs: php | prophp | security | design | zen | software
    refs: dhtml | gecko | prototype | phpdocs | unicode | charsets
    tools: ide | ftp | regex | ffdev




  3. #3
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,235
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    I concur with beetle. My res is 1280x960 at home, and 1600x1200 at work. Do you think that I ever browse fullscreen? You may want to rethink your background strategy. How about just a background image centered on page?

  4. #4
    ♪♪ ♪ ♪ ♪ ♪♪ ♪ ♪♪ Markdidj's Avatar
    Join Date
    Sep 2002
    Location
    Bournemouth, South UK
    Posts
    1,551
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    use percentages......

    Why don't you use percentages, get your image size changing when the window is resized?
    LiveScript: Putting the "Live" Back into JavaScript
    if live output_as_javascript else output_as_html end if

  5. #5
    SitePoint Member Ozz's Avatar
    Join Date
    Aug 2002
    Posts
    24
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    how?

    Is there anyway to do percentages with background images?
    Like table percentages huh ?
    Spare time terminator:
    Limk.com
    c:\internet.zip

  6. #6
    ♪♪ ♪ ♪ ♪ ♪♪ ♪ ♪♪ Markdidj's Avatar
    Join Date
    Sep 2002
    Location
    Bournemouth, South UK
    Posts
    1,551
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    I'm not sure.....

    But you can position the pic at 0,0 and size it in percentages.
    you might have to size it above 100%, at 100% my pics are slightly smaller than the window.
    If you dont need it to scroll, use overflow:hidden on the body. I think you can set direction of overflow as well, say only side scroll-bar. I'm not sure how to do this but I'm sure someone in here will know....

    Hope it helps
    LiveScript: Putting the "Live" Back into JavaScript
    if live output_as_javascript else output_as_html end if


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
  •