Gaya / jQuery--Keep-the-Rhythm

Keep a nice vertical rhythm with elements that don't have one.
20 stars 4 forks source link

Mis-aligned text #1

Closed zspecza closed 11 years ago

zspecza commented 11 years ago

Hey, I found your library the other day and decided to play with it, and I'm running into the issue of text below images being pushed off of the grid. The images themselves align just fine. Here's a reproduction using Compass' vertical rhythm module: Mis-aligned text (note the text underneath the image compared to the text on top)

I tried using Dan Eden's baseline.js as well and ran into the exact same problem - so I'm very sure this is a problem with my code and not your library, but since you're the author I was wondering if you could help me figure out what I'm doing wrong here?

Gaya commented 11 years ago

Hi,

You have to define a height of the image (img height="200" .... />) and you have to make the img a block element in CSS (display: block). That fixed it for me.

Good luck!

Gaya