I am building a plugin and i use bootstrap to style it but i notice some components styles don't work properly.Someone suggested in a blog post to use wp_deregister_style('wp-admin'); which did fix my issues but broke the rest of the wp-admin page.

Is there a way to override the css that loads in the wpbody-content?


If your bootstrap.css is loaded correctly with the admin_enqueue_scripts action, there might be a stricter selector in an other css file which overrides your style.
The stylesheet with the most precisely selector wins the battle of styling your element.


It turned out that there was already a .card class from wp that had some extra attributes than bootstrap's so they were overriding it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.