SunQuest
           HTML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignHTML Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old August 2nd, 2000, 03:01 PM
scream scream is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2000
Posts: 441 scream User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 22 h 59 m 38 sec
Reputation Power: 9
Send a message via ICQ to scream
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).]

Reply With Quote
  #2  
Old August 2nd, 2000, 03:26 PM
billy10k billy10k is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2000
Posts: 12 billy10k User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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).

Reply With Quote
  #3  
Old August 2nd, 2000, 03:29 PM
scream scream is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2000
Posts: 441 scream User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 22 h 59 m 38 sec
Reputation Power: 9
Send a message via ICQ to scream
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.

Reply With Quote
  #4  
Old August 3rd, 2000, 01:15 PM
billy10k billy10k is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2000
Posts: 12 billy10k User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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).]

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignHTML Programming > alignment trick


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway