WordPress.org

Forums

[resolved] Images in post distorts most themes???? (8 posts)

  1. Ulrika
    Member
    Posted 9 years ago #

    I have a question: When looking at all the lovely themes in the theme wiewer I see very few that handles pictures in posts in a goodlooking way. ie. If the text is shorter than the image inserted the image will be placed beside the footer of the post... Anybody seen it?
    Maybee I am daft that doesn't understand it but why is that?

    WordPress is one of the few that doesn't do that or????(Lovely coded css too;-) Clean)
    Could anyone tell me why and how to fix it? Please! Awfully curious and total noob in php but somewhat used to work with css

  2. maerk
    Member
    Posted 9 years ago #

    Actually, you only really need to know about CSS to do what you're asking.

    What did you want to happen when the image was longer than the text?

  3. Ulrika
    Member
    Posted 9 years ago #

    I do not want the posted in footer to be placed beside the image

  4. Ulrika
    Member
    Posted 9 years ago #

    Sorry all! I have got the answers I needed to how to fix it at least.
    Thanks maerk for bothering!

  5. moshu
    Member
    Posted 9 years ago #

    For the benefit of the posteriority (read: the next guy who'll get the same problem) - could you, please, post here what was your solution? Thanks.

  6. Ulrika
    Member
    Posted 9 years ago #

    Here is my solution:

    When having a float:left tag for img in posts you have to have a div BENEATH the post that has the tag clear:left if you want to be sure the picture wont get into next post so to speak. (this happens in a LOT of themes when having to little text beside the picture I realized when testing them out)

  7. newflesh
    Member
    Posted 9 years ago #

    I've thought of that problem before, and for some reason never thought of clearing the floats after the text. But it shouldn't be necessary to add empty divs like that. In most cases it should work by adding the "clear" attribute to the element that follows the post body (permalink, author name, category... whatever comes first) in the stylesheet.

  8. jamespoling
    Member
    Posted 8 years ago #

    for the record, adding the clear:left attribute to the element that follows the body worked perfectly.

    Thanks newflesh.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags