Welcome to Geeklog, Anonymous Monday, December 23 2024 @ 12:38 am EST
Geeklog Forums
HTML (Javescript?) Image control
Anonymous
Anonymous
I have a staticpage that displays an image at the top of the screen. At 800X600 screen resolution the image displays perfectly. But at 1024X768 it displays with lots of space on each side (centered).
I'm thinking I could develop TWO images, one for 800X600 mode and another VERY SIMILAR image for 1024X768. Unfortunately I do not know how to test screen size and then specify which image should be selected for display.
Is this fairly easy to do? And if so, how?
THANKS!!!
5
6
Quote
Status: offline
DTrumbower
Forum User
Moderator
Registered: 01/08/03
Posts: 507
Just set the backgound color the same as the image. When some one expands their browser you won't see white space.
Dwight
8
5
Quote
Anonymous
Anonymous
Yes, it's possible with some detection code but it's not wise to do because you don't know what resolution the larger monitor is set at.
5
8
Quote
Anonymous
Anonymous
I'm not sure I follow. I agree I don't know the resolution of the monitor. That is what I wish to detect, right?
Actually, I don't really care (I don't think) about the resolution, as long as it is larger than 800X600. If it is, then I wish to display image "big". If the resolution is 800X600 or less, I wish to display image "normal."
Anyone set at 640X480 will just have to scroll.
(Hoping this makes sense and is reasonable)
6
4
Quote
Anonymous
Anonymous
The browser sends the visitor's screen size to the server when it accesses your page. I don't think it sends the resolution at all. Most people who have larger screens like me set the browser window to smaller than full size because we have multiple ones open. This dimension is not sent to the server.
If you are intent on doing this, just do a search for how to do detection of screen size then modify your page to add this.
6
5
Quote
Status: offline
DTrumbower
Forum User
Moderator
Registered: 01/08/03
Posts: 507
It really isn't good site design. You are forcing the user to see what you want them to see, instead of how they want to see it. Making a site less usable also makes a site less visited.
Dwight
4
6
Quote
All times are EST. The time is now 12:38 am.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content