WordPress.org

Ready to get started?Download WordPress

Forums

Please wrap all post images with a consistent tag! Not divs AND p (2 posts)

  1. jimmytuesday
    Member
    Posted 4 months ago #

    Right now images are wrapped in paragraph tags - unless they have a caption, then they are wrapped in a div - which makes it awfully hard to set different style behaviors for images and text.

    My example:

    I'm trying to design a feature for my client where he can post two images side by side in a post - using align left and align right.

    Trying to account for all the variables in this process (two images side by side with captions, two side by side without, one with one without, followed by text, followed by more images, etc....) it is extremely hard to figure out how to do this when images with captions are wrapped in a div tag, and images without are wrapped in a paragraph tag.

    The floating images and text produce some unpredictable display behavior. Especially if you're trying to make two images side-by-side start at the same horizontal point - If the row above it is two images, one without a caption or different heights, they will begin staggered vertically - if text follows this example it will try to wrap.

    My conclusion:
    Please wrap text in paragraph tags and images in divs - whether or not they have a caption! It will be so much easier to style!

    Thanks

  2. Andrew Nevins
    Spam zapper & Volunteer Moderator
    Posted 4 months ago #

    Would it be easier to use custom content types in the dashboard? So that you can create your own HTML layout predictably.

Reply

You must log in to post.

About this Topic