WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] CSS in post

[Resolved] CSS in post

  • Abhijit

    @abhiwithnewlife

    This is might be a stupid question, but I am little new to wordpress. I entered html code in html editor while writing a post. I entered complete code including head, style and body. Then i switched to visual editor. When i again, switched back to html editor, all style and code was gone!!! Though I found all styling is still working with the post, how to find that code?
    Also, if I add custom style in style.css, how to use those styles while writing content on posts or pages?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator Andrew Nevins

    @anevins

    Forum moderator

    The HTML editor is really just for HTML.
    Try to use a Child Theme or Custom CSS Manager to hold your CSS modifications.

    Also, if I add custom style in style.css, how to use those styles while writing content on posts or pages?

    Styles will do this automatically as long as you use correct CSS selectors
    http://www.w3schools.com/cssref/css_selectors.asp

    Abhijit

    @abhiwithnewlife

    ok. Andrew, got it.
    But now problem is, my css(that I defined in post) is not working properly. It was working well earlier. Is it like that my earlier style is saved somewhere? and that is causing problem?

    Abhijit

    @abhiwithnewlife

    @andrew : Solved. Thank You very much. Just added custom css file. and used id/class in html post. and done.

    Thank You very much.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Resolved] CSS in post’ is closed to new replies.
Skip to toolbar