WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] CSS in post (4 posts)

  1. abhiwithnewlife
    Member
    Posted 1 year ago #

    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?

  2. Andrew
    Forum Moderator
    Posted 1 year ago #

    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

  3. abhiwithnewlife
    Member
    Posted 1 year ago #

    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?

  4. abhiwithnewlife
    Member
    Posted 1 year ago #

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

    Thank You very much.

Topic Closed

This topic has been closed to new replies.

About this Topic