Strange top margin in other cells when IMG tag is first in a CSS table cell -
i have noticed bug several times when programming , wonder if has work around. when create css table using display:table property, if 1 of cells contains img first element, text in adjacent cell begins below image's height. if put text before image tag, text in next cell displays normally.
i have noticed if display property of img block, text in next cell begins below image, if img set display:inline, text next door aligns it's baseline baseline of image.
ideally, content begin @ top of each cell, , start column image.
when create css table using display:table property
you're having problem because default vertical-align
baseline
div
s (which assume you're using).
to fix it, specify vertical-align: top
on whatever has display: table-cell
.
Comments
Post a Comment