problem with resizing image
i'm having major brain fart. i have a large image on a page. that's it. the image is in landscape orientation, and i need it to resize to fill the screen without distortion.
i tried style="max-height:100%", which worked great on computer monitor, but caused horizontal scrolling on mobile browsers. so i tried style="max-width:100%", and that worked great on mobile browsers, but caused vertical scrolling on computer monitors.
i need it to fill either the height or the width (whichever is smallest) and center itself on the screen otherwise.
whhhhhy, oh why, can't i figure this out?
i'm certain it's simple and i'm just missing it, but i'd love to get steered in the right direction. thanks for any help you can offer...