Reputation: 11
I have a table which I want to align some divs horizontally, but it doesn't seem to be working for me. I'm sure the solution in simple.. What I'm finding annoying is that the text-align
feature is only aligning the textareas (which is perfectly normal) but I can't find a way to do the same with the divs.
What is weird though is that when I zoom in a lot it does align.
Upvotes: 1
Views: 41
Reputation: 1733
https://jsfiddle.net/9a2mc3vw/ ~ check this fiddle
background-image: url('http://i.imgur.com/sn7XtQE.jpg');
height: 51px;
width: 51px;
display: table-cell;
Upvotes: 1
Reputation: 538
this code will work if you delete display: inline-block in your div id
background-image: url('http://i.imgur.com/sn7XtQE.jpg');
height: 50px;
width: 50px;
margin: 0 auto;
Upvotes: 0