• Resolved kanto19

    (@kanto19)


    Hey fellas, I’m trying to edit this code as so

    If
    Product Attribute Scanned text is ‘Image is a stock photo’
    Then do this code

    @media (min-width: 769px) {
    .woocommerce #content div.product div.images,
    .woocommerce div.product div.images,
    .woocommerce-page #content div.product div.images,
    .woocommerce-page div.product div.images {
    width: 30%;
    }
    .woocommerce #content div.product div.summary,
    .woocommerce div.product div.summary,
    .woocommerce-page #content div.product div.summary,
    .woocommerce-page div.product div.summary {
    float: right;
    width: 65%;
    }
    }

    Any ideas on how I can implement this? It’s a fix I’ve found that works with my website to specific listings.

    Thank you.

    • This topic was modified 5 years, 9 months ago by kanto19.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • You will have something like:

    <select id=”pa_size” class=”” name=”attribute_pa_size” data-attribute_name=”attribute_pa_size” data-show_option_none=”yes”>
    <option value=””>Choose an option</option>
    <option value=”xs” >XS</option>
    <option value=”s” >S</option>
    <option value=”m” >M</option>
    <option value=”l” >L</option>
    <option value=”xl” >XL</option>
    <option value=”2xl” >2XL</option>
    </select>

    So in this case, if you want to change the background color of the 2XL you would use:

    option[value=2xl] {
    background-color: yellow;
    }

    Hi @kanto19,

    @seank123 has the right answer, and it looks like it should work. I am going to go ahead and mark this as Resolved but if you have further questions please let us know by opening a new thread!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Adding a ‘If Product Attribute is’ CSS Code’ is closed to new replies.