Win a copy of Event Streams in Action this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Prevent portrait images from overflowing screen

 
Rancher
Posts: 3410
33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm trying to write a javascript slideshow (yes another one) to show images listed in a .js file.  The images are a mix of landscape and portrait layouts.  I am having a problem keeping the portrait images from overflowing the browser's display area and making it necessary to scroll to see the full image.  Is there a way in javascript and css to keep the images within the browser's viewing area?
Here's one of my many attempts:


Also posted here: https://www.dreamincode.net/forums/topic/416918-prevent-portrait-images-from-overflowing-screen/
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!