Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #24581
| From | emf <emfril@gmail.com> |
|---|---|
| Newsgroups | comp.lang.javascript |
| Subject | Re: Resizing images |
| Date | 2014-06-02 15:36 -0400 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <lmijnb$16m$1@speranza.aioe.org> (permalink) |
| References | (5 earlier) <7989382.AyDL1cKXdP@PointedEars.de> <lmf2v8$am7$1@speranza.aioe.org> <538b6ff2$0$6602$9b4e6d93@newsspool4.arcor-online.net> <lmhgp8$4g2$1@speranza.aioe.org> <538c4e74$0$6617$9b4e6d93@newsspool4.arcor-online.net> |
On 2014-06-02 06:14 Christoph Michael Becker wrote:
> emf wrote:
>
>> On 2014-06-01 14:24 Christoph Michael Becker wrote:
>>> emf wrote:
>>>
>>>> I was hoping that with javascript one could get the size of the window
>>>> and assign it to the height of each image. There should be some way of
>>>> doing it. After all, how does the ImageZoom Firefox extension does it
>>>> when you click Image fit?
>>>>
>>>> What does viewport mean anyway?
>>>
>>> The term viewport is the common name for what you call "size of the
>>> window", see <http://en.wikipedia.org/wiki/Viewport#Computing>. How to
>>> determine its size is described in the FAQ:
>>> <http://pointedears.de/scripts/faq/cljs/#getWindowSize>.
>>>
>> OK, they are talking about width, no height. I had already found out
>> that max-width seems to solve that problem, but it is not the problem I
>> would like to solve.
>
> They are talking about the height of the viewport as well.
Thanks. Actually the code
function imageheight() {
var i;
for (i = 0; i < document.images.length; i += 1) {
if (document.images[i].height === 600) { // portrait images height
document.images[i].height =
document.documentElement.clientHeight - 42; //padding + border
}
}
}
works OK with Firefox. Since the issue is not crucial, a note to the
effect that "This webpage is best viewed with Firefox" should do until
they standardize and/or implement the property.
emf
--
Google's top Spherical Triangle Calculator search result!
https://files.nyu.edu/emf202/public/js/spherical.html
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Resizing images emf <emfril@gmail.com> - 2014-05-30 09:01 -0400
Re: Resizing images "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-05-30 16:17 +0200
Re: Resizing images Christoph Michael Becker <cmbecker69@arcor.de> - 2014-05-30 19:20 +0200
Re: Resizing images Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-05-30 21:51 +0200
Re: Resizing images Christoph Michael Becker <cmbecker69@arcor.de> - 2014-05-31 13:27 +0200
Re: Resizing images emf <emfril@gmail.com> - 2014-06-01 07:31 -0400
Re: Resizing images Christoph Michael Becker <cmbecker69@arcor.de> - 2014-06-01 20:24 +0200
Re: Resizing images emf <emfril@gmail.com> - 2014-06-02 05:39 -0400
Re: Resizing images Christoph Michael Becker <cmbecker69@arcor.de> - 2014-06-02 12:14 +0200
Re: Resizing images emf <emfril@gmail.com> - 2014-06-02 15:36 -0400
Re: Resizing images Christoph Michael Becker <cmbecker69@arcor.de> - 2014-06-02 21:47 +0200
Re: Resizing images Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-06-02 23:24 +0200
[FAQ Discussion] How do I find the size of the window? (was: Resizing images) Christoph Michael Becker <cmbecker69@arcor.de> - 2014-05-31 20:41 +0200
Re: [FAQ Discussion] How do I find the size of the window? Cezary Tomczyk <cezary.tomczyk@gmail.com> - 2014-05-31 22:07 +0200
Re: [FAQ Discussion] How do I find the size of the window? Christoph Michael Becker <cmbecker69@arcor.de> - 2014-06-02 14:56 +0200
csiph-web