|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
I've got an issue I hope can be resolved with DHTML. I have an image that I would like to align to the bottom right corner of my page. This is easy with a table. However, if the screen resolution is more than 1024 pixels wide I want the right edge of the image to be only 1000 pixels to the right.
See http://free-games.allthingsfree.com/ and you'll understand what I mean. The background image is 1000 pixels wide and tiles only vertically, so the image ends off in white space if the screen resolution is wider than 1024. I can't just set the table width to 1000 because then anyone with a small resolution would have to scroll. Any ideas for me? [This message has been edited by scream (edited August 02, 2000).] |
|
#2
|
|||
|
|||
|
You could probably do it with javascript, by detecting their resolution and from that either set the table width to 1000 (if their resolution is higher than 1024) or set the table width to 100% otherwise. But... I don't remember javascript well enough to help you out with writing it.
The background picture youre using is rather large.. if its 1000 wide, its atleast 768 high because I couldnt see it repeating itself (in full screen browsing in IE5). I'm on cable modem so it appeared instantly, but maybe having a picture that big isnt the best idea for modem users? Just a suggestion. Another thing you could do is just make the bg pic even wider. Almost no one (and i mean no one) is in a higher resolution than 1280x960... so you could make it 300 pixels wider, and would never have to worry about it (except for the one in ten trillion people who have resolutions higher than that). |
|
#3
|
|||
|
|||
|
I did think about the large size of the background image. It's 40k and most of my users are broadband. It's really the only graphic bigger than a few kb so I think it will be alright.
I did find a javascript solution to the problem. View the source to the page if you're interested. |
|
#4
|
|||
|
|||
|
hehe.. now that wasnt too hard was it?
![]() If the BG pic is only 40k.. thats not a big deal. I thought it would be more like 100k because of the size. One thing I should mention however is that table height isnt an official tag (saw it in your javascript). I think netscape and IE both understand it but it wont always render right (from my experience). ![]() [This message has been edited by billy10k (edited August 03, 2000).] |
![]() |
| Viewing: Dev Shed Forums > Web Design > HTML Programming > alignment trick |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|