Author Topic: Change image width from fixed to percentage?  (Read 5337 times)

Offline Old-Paul

  • Newbie
  • *
  • Posts: 9
  • Karma: +1/-0
  • Old web guy. Doing this for over 28 years!
    • View Profile
    • Stuff Done
Change image width from fixed to percentage?
« on: December 12, 2023, 12:28:10 PM »
In my attempts to make my cart more mobile friendly I want to adjust image widths to percentage as opposed to fixed hard coded width. Is there a way to change that configuration?
=========================================
  What does "retired" mean?  I'm almost 78 still doing this crap!

Offline isaachackett

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Re: Change image width from fixed to percentage?
« Reply #1 on: Today at 05:22:25 AM »
With a simple CSS update, you may convert the picture width from a fixed amount to a percentage. Set the width to a percentage (e.g., width: 100%;) rather than a fixed value (e.g., width: 300px;). By doing this, the images will become responsive and change to fit the size of the screen. For the percentage to function properly, just make sure the parent container has a specified width. Have fun with your coding!


 

Powered by SMFPacks Social Login Mod