The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Full image resizing.

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #272654

    am designing a web app, and the app will be used on mainly mobile devices. I want the whole image to stay inside the screen matter the dimensions of the image. Example:

    I have an image that is 200px by 1000px. It is displayed in the center of an iPhone screen, and the image is a bar in the center of the screen 200px in height. There are huge margins on the top and bottom of the screen. Then if the image is flipped 90deg, there is an image displayed as a bar 200px wide from top to bottom, while having margins on the left and right side of the screen.

    How can I accomplish this? Any help is greatly appreciated!


    We’d need a demo of the issue setup in CodePen to see exactly what’s going on with the code. Unfortunately we can’t diagnose a description.

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘CSS’ is closed to new topics and replies.