I am making Img hover for fun. But now I have some text in my div. I used the code:
display: table-cell;
vertical-align: middle;
to get the text beautifully centered in my div. And I also have this code:
.vertical-smallborder{
position: relative;
width: 217px;
height: 350px;
border: 5px solid white;
outline: 1px solid #c8c8c8;
float:left;
display: table;
-webkit-transition: all .3s;
-moz-transition: all .3s;
-ms-transition: all .3s;
-o-transition: all .3s;
transition: all .3s;
overflow: hidden;
}
I got the display: table over there for the text. If I remove that, the text would not be centered in the div.
Now I have a problem with overflow: hidden. In FireFox and IE overflow: hidden doesn't work anymore if there is a display: table.
Google Chrome and Safari both support display: table and Overflow:hidden together.
Note: It has to be pure CSS. So I cant use any javascript.
Thanks