I have a div (menuleft) that contains menu-items. These menu-items are also div's with a background picture. In those divs you got a link. Now, the problem is to vertical align that text in the middle of the div. If possible, like you see the div with the background image is 207px on 32px, I want that hole area to be clickable for the a href...
In Firefox this works nice. But IE...
#menuleft {
postion: relative;
margin-top: 15px;
}
.menuleft-item {
display: table;
background: transparent url('/images/left_menu.jpg') no-repeat;
width: 207px;
height: 32px;
margin-top: 5px;
text-align: right;
}
.menuleft-item a {
display: table-cell;
vertical-align: middle;
width: 270px;
height: 32px;
color: #FFF;
font-size: 13px;
text-decoration: none;
text-transform: uppercase;
padding-right: 15px;
}
<div id='menuleft'>
<div class='menuleft-item'>
<div>
<a href="...">...</a>
</div>
</div>
<div class='menuleft-item'>
<div>
<a href="...">...</a>
</div>
</div>
...
</div>
In Firefox this works nice. But IE...
#menuleft {
postion: relative;
margin-top: 15px;
}
.menuleft-item {
display: table;
background: transparent url('/images/left_menu.jpg') no-repeat;
width: 207px;
height: 32px;
margin-top: 5px;
text-align: right;
}
.menuleft-item a {
display: table-cell;
vertical-align: middle;
width: 270px;
height: 32px;
color: #FFF;
font-size: 13px;
text-decoration: none;
text-transform: uppercase;
padding-right: 15px;
}
<div id='menuleft'>
<div class='menuleft-item'>
<div>
<a href="...">...</a>
</div>
</div>
<div class='menuleft-item'>
<div>
<a href="...">...</a>
</div>
</div>
...
</div>