WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Editor: Keeps moving P tags outside of DD tags (4 posts)

  1. MarkRH
    Member
    Posted 1 year ago #

    Using WP 3.4.2. Any reason why the Editor keeps moving paragraph tags (along with their contents) outside of DD tags even though it is allowed according to: http://www.w3schools.com/tags/tag_dd.asp

    Actually, it moves the paragraph outside of the whole DL list. I do have "WordPress should correct invalidly nested XHTML automatically" unchecked in the writing options.

    For now, I'm just using multiple DD tags instead of P tags but depending where the content is viewed, a DD element normally has no padding around it. Anyway, I can work around this issue but I'm just wondering why the editor thinks it needs to move the content like this.

    Thanks

  2. Rev. Voodoo
    Volunteer Moderator
    Posted 1 year ago #

    Is this happening on save? Or are you switching between html/visual editors at all?

  3. MarkRH
    Member
    Posted 1 year ago #

    OK, I figured out what I was doing wrong. If I enclose everything inside the DD element with P tags, it keeps everything in place.

    It would move a paragraph outside the DL list if I had it coded as follows:

    <dl>
    <dt>Some date</dt>
    <dd>Some text here with no surrounding paragraph tags
    <p>A new paragraph inside the DD element</p></dd>
    <dt>Next item</dt>
    <dd>Blah blah blah</dd>
    </dl>

    However if it's recoded as:

    <dl>
    <dt>Some date</dt>
    <dd><p>Some text here with surrounding paragraph tags</p>
    <p>A new paragraph inside the DD element</p></dd>
    <dt>Next item</dt>
    <dd><p>Blah blah blah</p></dd>
    </dl>

    Then all the paragraphs stay where they are.

  4. Rev. Voodoo
    Volunteer Moderator
    Posted 1 year ago #

    Interesting, thanks for reporting back!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags