Support » Themes and Templates » Invalid Property Value

  • Resolved daniish

    (@daniish)


    Hello,

    The thumbnail image beside my post excerpt is too large. You can see it here: http://www.willowgalleryoswestry.org/tag/photography/

    I have tried to add the following CSS to my stylesheet:

    /* Excerpt thumbnail - change image size */
    .entry-content .thumbnail.col-sm-6.wp-post-image {
       max-width: 100 !important;
    }

    However, this does not work and Chrome Developer Tools reports that max-width is an Invalid Property Value.

    Please can someone tell me how to resolve this?

    Many thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • First of all, you should avoid using the !important clause. It just makes things more difficult to change later on. As long as your selectors have enough specificity, you should be able to override just about any existing rule (except for those which are inline) without using it.

    Secondly, you don’t need to copy everything over from the parent theme into your child theme style.css file. You only want to include rules which you are modifying or adding.

    OK, so max-width is not a value, it’s a property. The value is 100, that’s what is invalid, and the reason why it’s invalid is because you don’t have a units of measure after it. The most common unit of measure is px for pixel, so the rule should be:

    /* Excerpt thumbnail - change image size */
    .entry-content .thumbnail.col-sm-6.wp-post-image {
       max-width: 100px;
    }

    Thread Starter daniish

    (@daniish)

    Thank you for helping me.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Invalid Property Value’ is closed to new replies.