Forums

Tag mismatch caused by WP (3 posts)

  1. buskerdog
    Member
    Posted 2 years ago #

    I've noticed that WP adds <p> tags in a somewhat haphazard way. For example, if I put the follwing in a post:

    <div class="my-text">BLAH BLAH BLAH
    
    BLAH BLAH BLAH</div>

    Then what comes out is

    <div class="my-text">BLAH BLAH BLAH</p>
    
    <p>BLAH BLAH BLAH</div>

    or something like that, which causes my otherwise validating page to have all sorts of mismatch errors. What can I do?

  2. esmi
    Theme Diva & Forum Moderator
    Posted 2 years ago #

    Try:

    <div class="my-text">BLAH BLAH BLAH
    BLAH BLAH BLAH</div>
  3. buskerdog
    Member
    Posted 2 years ago #

    Yeah, screwing around with the spacing like that seems to be the solution, i guess. Kind of wacky but what are ya gonna do.

Topic Closed

This topic has been closed to new replies.

About this Topic