• 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.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Are you switching between the HTML and Visual tabs? If so, that’s a bad idea and could cause exactly the problems you describe.

    Thread Starter Nate

    (@nironan12)

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

    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.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Problem with divs’ is closed to new replies.