Forums

Problem with divs (4 posts)

  1. nironan12
    Member
    Posted 2 years ago #

    Everytime I add a <div> in the HTML part of the post editor, WordPress adds a line break before the <div> and after the </div>! Why won't WordPress leave my code alone? The line-breaks totally mess up my post.

  2. esmi
    Theme Diva & Mod
    Posted 2 years ago #

    Are you switching between the HTML and Visual tabs? If so, that's a bad idea and could cause exactly the problems you describe.

  3. nironan12
    Member
    Posted 2 years ago #

    I only do it in HTML but when I publish it makes line breaks.

  4. esmi
    Theme Diva & Mod
    Posted 2 years ago #

    If you're placing your <div> on a new line, that could account for the /n line break (I'm assuming that it's not adding in <br /> markup). If you want to stop that, don't place <div> or </div> on a new line.

Topic Closed

This topic has been closed to new replies.

About this Topic