Forums

[resolved] Paragraph top/bottom margin in the editor (4 posts)

  1. Dethredic
    Member
    Posted 9 months ago #

    In the style.css for my theme I have set the top / bottom margin for paragraphs to 0px.

    In the wordpress visual editor, it seems like there is 15-20px margin for both the top and bottom of the paragraphs, which causes them to look very different then how they appear. Is there a way to change this?

  2. Edward Caissie
    Member
    Posted 9 months ago #

    If the theme you are using supports the "editor-style" functionality then you will need to create or edit the existing editor style sheet to give a similar "look" in the visual editor.

    Generally speaking, look in the themes functions.php file for the following (default) line(s) of code:

    // Add theme support for editor-style
        add_editor_style();

    IF the above exists, look for the (default) editor stylesheet 'editor-style.css' and make your style edits there.

    Of course, if the theme does not natively support the above functionality you can easily add it to the theme or better yet create a child theme and add the functionality that way to insure when the theme is updated your edits are not over-written ... and don't forget to make back-ups first.

  3. Dethredic
    Member
    Posted 9 months ago #

    Perfect, thanks. Created my own editor-style.css

  4. Edward Caissie
    Member
    Posted 9 months ago #

    You're welcome! Glad to help.

Reply

You must log in to post.

About this Topic

Tags

No tags yet.