I’d like my text to align perfectly with the top of my images, but I believe line-height is impacting this. Here is an example of a left-aligned image: [//themeforward.com/demo2/2013/04/24/2289/](//themeforward.com/demo2/2013/04/24/2289/ “”)
I threw it into CodePen to better illustrate the CSS and markup: [//codepen.io/anon/pen/Cpovd](//codepen.io/anon/pen/Cpovd “”)
I wouldn’t necessarily structure it that way but whatever your line height is, say 2em then there is 1em of space to be divided between the the area above and below the line.
Therefore, add half of that as top margin to the image and it should line up…at least close enough.
Paulie, thanks for the help. How would you suggest it is structured?
To me a ‘post’ would have a wrapping div which could then contain an image and the text.
In the Codepen you can see that because the image is floated it pops out of the paragraph (add a border to the p to see it).
I guess I’m just used to doing it that way….not saying it’s better.
You must be logged in to reply to this topic.