WordPress.org

Ready to get started?Download WordPress

Forums

Images and spacing problem. (3 posts)

  1. ucantnot
    Member
    Posted 6 years ago #

    I have a problem regarding images and spacing; which I’m sure resides in my Style CSS. I’ve done a search on this already, but I’m not finding a solution to my problem. Hopefully, someone here can help…

    My problem is this: When I make a post and add an image, unless I add text below it, the post doesn’t recognize that the image is part of it – so, when you view the post on the main blog page, the image appears under the correct post but overlaps on the post below it. Furthermore, the ‘comments’, ‘edit’, etc. links that appear at the bottom of the post line up along the right/left side like normal text.

    Does anyone know how I can correct this, so the comments and edit links are lined at on the bottom of the post and the image doesn’t overlap on the post below it?

    Something that would be incredibly helpful would be if there is a code or tag that I can insert at the end of each post when editing, so that the finished entry has the comments and edit links automatically lined up along the bottom – regardless if there is an image or just text.

    Any input would be greatly appreciated.

    Thanks!

  2. Cornell_Finch
    Member
    Posted 6 years ago #

    I'm guessing that you post mostly images with no much text? The problem is that the post content CSS doesn't (by default) get a min-height attribute. This means that when the image ends it will just start placing the next line of text beside it.

    You can add a min-height attribute to the CSS file which needs to be longer than the image+comments/edit links, or you can pad the post out with non breaking spaces and BR tags

    The second option is messy and not really good markup though.

    We can then look at it and tell you what you need to alter in the CSS file.

  3. ucantnot
    Member
    Posted 6 years ago #

    Thank you of the quick response CF. I do sometimes post more pictures than text, and I have used the BR tags to create the needed spacing in the past – you are correct though, it’s a messy process; with different browsers reflecting different spacing "breaks".

    What’s needed to add a min post height in the CSS file? I think I’d like to try this.

Topic Closed

This topic has been closed to new replies.

About this Topic