Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

display: table-cell alignment issues when images are used

Tags:

css

css-tables

omg this is driving me mad. I have one table-row containing two table-cells. if both cells contain only text it works just fine, but the moment I put an image on one "cell", the other cell jumps to align at baseline... even though they are in different divs.

jsfiddle here

halpl!

like image 419
kristina childs Avatar asked Aug 21 '12 23:08

kristina childs


People also ask

How to Center images in a table in Word?

The Table Options dialog box. Set the Top, Bottom, Left, and Right controls to 0 and feel free to clear the Automatically Resize to Fit Contents check box. Click OK, and these formatting settings are applied. Your graphic should now be exactly centered in the cell.

How to align image in cell Word?

Select Shape Format or Picture Format. Select Align. If you don't see Align on the Shape Format tab, select Arrange, and then choose Align.


1 Answers

Specify vertical align..

.table-cell { 
    display: table-cell;
    vertical-align:top;
    }
​
like image 72
meder omuraliev Avatar answered Nov 11 '22 22:11

meder omuraliev