简体   繁体   中英

Facebook comments plugin — how to override the WordPress theme's color

I installed the Facebook comments plug-in on a WordPress website but the theme's color is overriding the chosen dark background color for the plugin.

It's all white but it should have a dark border. I've tried adding !important to the plugin's div background color to no avail.

How can I override this?

You can style .fb-comments

.fb-comments {
    border: 1px solid #000;
}

That's because it uses an iframe to load the data. Your best bet may be to use javascript to select the element class and then modify the css. In jQuery, I would do:

$('.classname').css()

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