So i'm trying to center a text in the middle of a div. I looked half of the website, and it looks like i have to do smthg like that :
.container{
width:100px;
height:200px;
display:table-cell;
vertical-align: middle;
line-height: normal;
}
But it doesn't work...
Here's what i do :
HTML:
<div id="left_bot" class="menu_button"><span class="text_menu_button">Div1</span></div>
CSS:
.menu_button{
width:37%;
height: 44%;
text-align: center;
display: table-cell;
vertical-align: middle;
line-height: normal;
font-size: 48px;
}
#left_top{
top:0;
float:left;
background-color: red;
margin: 2% 1% 1% 2%;
}
But i still have the text in the center, but not in the middle of the div.
I don't get why, i tried to insert the vertical-align on a .text_menu_button but still nothing :x
Thx