简体   繁体   中英

Hide element with CSS in WordPress

I have a WP page where I want to hide an element.

On page inspection I find following

HTML

<button type="submit" name="add-to-cart" onmouseover=";" onmouseout=";" onload=";" class="single_add_to_cart_button button alt  gpls_rfq_set gpls_rfq_css" value="1272" style="display: inline-block">Buy Now</button>

Getting Rule as

element.style {
    display: inline-block;
}

I want change it to

<button type="submit" name="add-to-cart" onmouseover=";" onmouseout=";" onload=";" class="single_add_to_cart_button button alt  gpls_rfq_set gpls_rfq_css" value="1272" style="display: none">Buy Now</button>

to hide the Buy Now button. I tried multiple CSS combination but there is no output.

You can write

style="display: none!important"

Perhaps somewhere there are styles whose priority is higher, otherwise you will make this one more priority than the rest

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM