Support » Fixing WordPress » If excerpt text is too short it breaks my layout (using custom field images)

  • Resolved ckinard

    (@ckinard)


    Hi All,

    I seem to be having a layout issue that I cannot figure out. On my front page I am displaying excerpts. Each excerpt has a left aligned custom field image next to the text. The problem I am having is that if the excerpt text is too short (less that then height of the image) it will mess up my layout. Is there away to have the custom field image set the height of the excerpt? Here is a screen shot showing my problem and how it should be:

    Broken Format:

    Proper Format: (Photoshop)

    Any help is appreciated.

    Thanks!
    Corey Kinard

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter ckinard

    (@ckinard)

    Helps if I post the links: 😉

    Broken Format:

    Proper Format: (Photoshop)

    Thanks!
    Corey Kinard

    It looks like what I call the collapsing div problem, and it’s related to floated elements (like images). Try this after the end of the div containing the excerpt and image:

    <br style="clear: both" /><!-- stops floated image div overlap -->

    Thread Starter ckinard

    (@ckinard)

    Iridiax,

    That worked like a charm! Thank you very much for the assistance!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘If excerpt text is too short it breaks my layout (using custom field images)’ is closed to new replies.