 |
|
|
| View previous topic :: View next topic |
| Author |
Message |
Giraf
Joined: 14 Nov 2008 Posts: 2
|
Posted: Fri Nov 14, 2008 12:15 pm Automatically resize image to browser window |
|
|
|
| I would like to display photographs so that they fill as much as possible of the browser's window. If I specify dimensions on the IMG tag, some people see the picture with a lot of unused space around, and some must scroll to see all of it. Is this possible to achieve by a not-to-complicated HTML / Javascript programming? |
|
Corey Bryant Site Admin

Joined: 15 May 2004 Posts: 8431 Location: Castle Pines North, CO USA
|
|
Giraf
Joined: 14 Nov 2008 Posts: 2
|
Posted: Fri Nov 14, 2008 2:19 pm |
|
|
|
| Thanks! As I suspected, there is no simple way. I was mainly thinking of the case where my picture is too big for the viewer's window. (Many new laptops have a rather low screen, and Windows' toolbars eat up some of it.) Making a pop-up solves the opposite problem. It seems best to specify reasonably small dimensions. |
|
RushdenRotaract
Joined: 20 Dec 2008 Posts: 3
|
Posted: Sun Dec 21, 2008 2:44 pm |
|
|
|
| you would be best using a specific size, what you could do is have it as big as possible and then force it to be smaller and link to a full version when you click on it, normally an image viewed on its own in a browser will get as big as it can without scrolling if its bigger than the window and only if you click o it it will become full size so that you have to scroll |
|
thetermy
Joined: 23 Dec 2008 Posts: 4
|
Posted: Tue Dec 23, 2008 10:25 am Re: Automatically resize image to browser window |
|
|
|
| Giraf wrote: |
| I would like to display photographs so that they fill as much as possible of the browser's window. If I specify dimensions on the IMG tag, some people see the picture with a lot of unused space around, and some must scroll to see all of it. Is this possible to achieve by a not-to-complicated HTML / Javascript programming? |
Ignore this if it is unhelpful, but, are you looking for a percentage value?
| Code: |
| <img src="yourimage.jpg" width="80%" height="50%"> |
You can set it within a table or just set it in a new window, with a percentage based width. The best way to maintain quality would be to upload a large image (1500x1500) so that it may be scaled down as apposed to stretched.
I hope this is helpful. |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|
|
 |
|
|
|
|
|
|
|