WordPress.org

Ready to get started?Download WordPress

Forums

Missing <p> tag on post (4 posts)

  1. YellowSwordfish
    Member
    Posted 9 years ago #

    I have noticed that if I place an image in a post, surrounded by a DIV (in this case to allow both image and caption), WP does not place an opening tag at the text following the </div> but it does put a closing p tag at the end. Hence the HTML becomes invalid. Still works OK of course.
    Is placing a div in a post taboo?

  2. oriecat
    Member
    Posted 9 years ago #

    Do you maybe just need to insert an additional carriage return?

  3. YellowSwordfish
    Member
    Posted 9 years ago #

    I guess that might force WP to insert the tag. But then the top of the paragraph wont line up with the top of the image. It's easy to get round - kill the div and just align the image (lose the caption) but it's also probably easily fixed in wp.

  4. xenogere
    Member
    Posted 7 years ago #

    You know, I'm having a similar problem--except it's the reverse. I put my images in a DIV, so WP 2.1 now places a P tag right after the opening DIV, but it doesn't put the /P before the /DIV. Placing CRs after the opening DIV and before the closing DIV doesn't fix it. This just started after I upgraded to WP 2.1.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags