简体   繁体   中英

Why my customized CSS for a wordpress theme is not working from cpanel?

I am trying to update the CSS of a theme I am using. To test if it works, I am display: none to a div .
Firstly I tried customizing the main style.css file of that theme

.comment-avatar {
    display: table-cell;
    width: 92px;
    margin: 0;
    vertical-align: top;
}

I set it to

.comment-avatar {
    display: none;
    width: 92px;
    margin: 0;
    vertical-align: top;
}

It's not working. But it does work if I edit it from "Addtional CSS" or "Custom CSS" provided in wordpress. But both of these increases the load time of my website.

I am looking around for a way to customize the main CSS file of that theme.

Edit : I am updating the theme's style.css but browser I am seeing that the style is applied from 'style.min.css' file which is also on the root. Aren't my changes to 'style.css' not reflected intp style.min.css automatically?

浏览器

To your CSS, try to give !important tag as shown below

.comment-avatar {
    display: none !important;
    width: 92px;
    margin: 0;
    vertical-align: top;
}

and then clear the cache.

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