• I’d like to set up a border at the bottom of posts on the index and archive pages. I have this set up in CSS and it works fine except when there is a thumbnail image (featured image). Then the line appears below the content and lines up with the center of the image.
    I tried adding css that forces the height of the post to a number just longer than the image and this solves the problem. However, this forces those posts with no featured images to also be the same height.

    Anyone know of a way I can write code that automatically loads css height for those posts with the image and leaves the height alone if no featured image exists?

Viewing 4 replies - 1 through 4 (of 4 total)
  • link to your site?

    this is probably an issue with clearing floats or so;
    this is best checked with a link to a page with the issue.

    Thread Starter cclinton

    (@cclinton)

    I yanked the height attribute from the post in the CSS and threw in a sample image so you could see what is happening.
    Here’s the link to the test space: https://s88691088.onlinehome.us/pm2011/

    .post_mn {float:left;
    margin-bottom:10px;/*optional*/}
    a.thumb img{margin-bottom:10px;/*optional*/}

    either added at the end of style.css, or edited in the corresponding styles, might work.

    only checked in firefox, not widely tested
    make backup copies of the theme files before editing

    Thread Starter cclinton

    (@cclinton)

    Thanks. I threw in:
    width: 590px;
    as well as the previous code was only underlining the length of the text in the post. This way the line goes the whole way across.

    It appears to be working in Firefox, IE and Safari.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘add CSS for post only if certain aspect exists’ is closed to new replies.