Support » Themes and Templates » CSS in post

  • Where do I put my own CSS to use in my posts? When I go to theme editor and add it to the stylesheet, it seems to ignore it when I try to use it by manually typing class=””, etc whereever I want to use it. Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • In order to use a css declaration in your html, you’ll have to use inline styles – you can’t just insert the css “bare” as it were.

    Here’s an example from

    <p style="background-color : #cccccc; border : none;">
    If you put this in your page, this paragraph will have an inline style to change the background color to grey.

    vkaryl is right in how to use styles “inline” in your posts. But you can’t do this for every post.

    Check to make sure you are changing the RIGHT style sheet. Check the name of the WordPress Theme you are using and make sure that it matches the name of the folder in which the style.css file you are editing is located.

    When you say that you add it to the style sheet it seems to ignore it, you can’t just “add” styles to the style sheet. For instance, if you already have a style set for, say, paragraphs, and you add another style for paragraphs, then which one is it going to pay attention to?

    There is a helpful article on the Codex, the online manual for WordPress, that will help you find the styles within your stylesheet so you can change THAT style specifically.

    And if it “ignores you” then what does that mean? That you can’t edit the style sheet or that you don’t see the changes on the screen?

    If you are more specific with how you want to change things and what you want to change, then we can be more specific.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘CSS in post’ is closed to new replies.