Auto Centering With Auto Resizing

Discussion in 'CSS' started by Jozy77, Apr 17, 2022.

  1. #1
    Members,
    I have this CSS code for auto centering an image
    upload_2022-4-17_22-0-35.png

    and it works great. But I've noticed that on non desktop screens the image isn't shrunk but rather cut in half and smaller. I was trying to get this code to resize it. It works fine elsewhere but not with the centering css
    width: auto ;
    max-width: 100% ;
    height: auto ;

    Any suggestions on how I can get the image auto centered and auto resized?

    Thanks much,

    Jozy
     

    Attached Files:

    Jozy77, Apr 17, 2022 IP
  2. OliviaWeb

    OliviaWeb Greenhorn

    Messages:
    13
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    11
    #2
    Hello Peon,
    Can you provide a link to your website to check the code?
     
    OliviaWeb, Apr 18, 2022 IP