SitePoint Sponsor |
|
User Tag List
Results 1 to 6 of 6
-
Feb 3, 2003, 16:42 #1
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?
-
Feb 3, 2003, 23:23 #2
-
Feb 3, 2003, 23:27 #3
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?
-
Feb 6, 2003, 12:47 #4
- 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
-
Feb 9, 2003, 15:32 #5
how?
Is there anyway to do percentages with background images?
Like table percentages huh ?
-
Feb 9, 2003, 21:24 #6
- 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 helpsLiveScript: Putting the "Live" Back into JavaScript
if live output_as_javascript else output_as_html end if
Bookmarks