I’m a little confused what you’re referring to. A game?
you obviously haven’t looked at my website. It doesn’t matter … Ignore the word “game”. How do I add CSS code with your plugin?
You have not really explained what you are looking for. If you want a basic example of how to add CSS, take a look at this article. Make sure to wrap the CSS code in <style>
</style>
tags.
Otherwise, if you are asking something a little more specific, you’ll need to explain in greater detail.
I have to put the CSS code in the body.
CSS code (i.e. <style>
or <link>
tags) can only be placed in the site head for it to be valid HTML. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/style
I don’t understand why you don’t tell me what code I should put in the snippets to insert the custom CSS in the body.
Did you look at the help article I linked?
add_action( 'wp_head', function () { ?>
<style>
<!-- put your CSS code here -->
</style>
<?php } );
Thanks. I have not looked at the guide, because I have big problems of understanding when looking for information. Now I understand what I have to do.
Well, let’s go back to the previous question; how can i prioritize my important rule if i can’t follow the two requirements to change the code?
The code was created by the third party program.
I’d need to see an example of the CSS you are working with to answer that, and the elements you are trying to style.
.ejs--5e71fd80268afbb1d588e40b993508 * {
color: #bcbcbc !important;
border: unset;
}
I can’t change the color because it has the important rule.
You need to override it with a more specific selector.
Take a look at the MDN article on CSS specificity for more details.