html5 vertical spacing issue with

后端 未结 4 1657
南旧
南旧 2020-11-28 11:06

I am trying to create a layout where the vertical spacing between divs is pixel perfect. So far I\'ve ruled out almost all the big grid systems (960.gs, Blueprint), because

4条回答
  •  一整个雨季
    2020-11-28 11:20

    The vertical-align: baseline is causing the gap at the bottom of your images.

    In Strict doctypes, images are inline elements and behave like text. Aligning inline elements at the baseline causes them to leave room for text descenders even if there is not any text.

    Adding img { vertical-align: bottom } to your reset stylesheet will fix the problem.

提交回复
热议问题