add CSS for post only if certain aspect exists
-
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)
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.