What you're looking for is viewport height/width. I'm not in front of
a box right now to see if jQuery has some such function to grab that
info.

Drew

On 8/7/09, Keith Lofstrom <[email protected]> wrote:
> I want to make my wydiwys presentation tool autoscale single
> images to the browser window.  I want to fill as much of the
> window as I can, while preserving the image aspect ratio.
> The math is easy, but learning the pixel height of the inside
> of the browser window is surprisingly difficult.
>
> I am using javascript and jQuery with the webslide pages.  Right
> now, I am scaling the image to 100% height, querying it to see
> what the height turns out to be, then rescaling down if it slops
> over on width.  Which joggles the display if the browser window
> is tall and narrow.   It would be nicer to know how big the window
> is, do the math, and display the image correctly the first time.
>
> I'm pretty new to all this, and a lousy programmer.  Can anyone
> suggest some browser-independent(*) code that will provide the
> height of the inside bounding box, and perhaps explain a little
> bit of how it works and what might break it?
>
> Keith
>
> (*) Okay, screw the really old browsers, but IE7/8, Firefox 2/3,
> Chrome, Safari, etc.  jQuery is cool because it provides a cross
> platform API, but I haven't found a function that does what I want.
>
> (ObRelevance) Wydiwys is open source, works best on Linux,  and
> will hopefully replace a lot of closed source tools.
>
> --
> Keith Lofstrom          [email protected]         Voice (503)-520-1993
> KLIC --- Keith Lofstrom Integrated Circuits --- "Your Ideas in Silicon"
> Design Contracting in Bipolar and CMOS - Analog, Digital, and Scan ICs
> _______________________________________________
> PLUG mailing list
> [email protected]
> http://lists.pdxlinux.org/mailman/listinfo/plug
>

-- 
Sent from my mobile device
_______________________________________________
PLUG mailing list
[email protected]
http://lists.pdxlinux.org/mailman/listinfo/plug

Reply via email to