• Resolved rosak

    (@rosak)


    [ Moderator note: moved to Fixing WordPress. Please do not use Developing with WordPress for these topics. ]

    Hi and welcome, it’s my first post here, I’m just starting with WordPress.
    In 1 of my sub pages I’m trying to set image width max 20% using
    <img class="max-width: 20%; alignleft wp-image-317" ..
    But the max-width setting is overwritten to 100% by Storefront’s style.css.
    How do I change that on just 1 page?
    I appreciate any help.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Your CSS syntax is wrong, and that’s why it’s not working. You need to use teh ‘style’ attribute, not ‘class’. eg:

    <img class="alignleft wp-image-317" style="max-width: 20%;" ...

    Thread Starter rosak

    (@rosak)

    That works! Thanks a lot catacaustic 🙂

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘img max-width %’ is closed to new replies.