Here’s the fiddle showing my problem: http://jsfiddle.net/7QaXL/1/
In the webkit-based browsers the padding of the <p>s seem to push the images up, which is not what I want.
So my questions are:
- What is the correct behavior (according to the specs)?
- How can I get six blocks of the same height, with inside elements with padding, without changing their alignments?
Firstly, I can’t replicate your problem. Secondly, I would try using something like this:
This makes much more sense semantically as now the details are tied to the relevant images, and this markup will allow you to have greater control over the styling.
figureandfigcaptionare HTML5 elements, if you need any further help just let me know!EDIT: Upon further exploration of the issue I have discovered that the issue you are encountering (as far as I can tell) is to do with
display: inline-block;and its natural behaviour. If you replace that property withfloat: left;and give the unordered listoverflow: hidden;(or use a clearfix technique) the problem should be resolved.