how can I center verically the img within that div?
using vertical-align and display table-cell is a solution that is not right in IE.
is there any other solution in CSS?
if not, is there any other solution using Javascript?
Since your #box div is a fixed height this can be done easily with display:inline-block; and an empty <b> element with a height set on it.
The trick is to set the empty <b> as inline-block so it can take a height. Set that height at 100% and it will base it’s height off of the parent. Then set v-align:middle; on it and the anchor.
The fluid height anchor will then v-align with the <b> element. It works in all browsers.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>V-Align - Fixed Height Parent</title>
<style type="text/css">
#box {
width: 164px;
height: 94px;
border: 1px solid red;
text-align:center;
}
#box a, #box b, #box img {
display:inline-block;
vertical-align:middle;
}
#box a {
padding:10px;
background:lime;
}
#box b { /*reference height for anchor v-align*/
height:100%;
}
#box img {/*testing without actual image*/
width:100px;
height:30px;
background:blue;
border:0;
}
</style>
</head>
<body>
<div id="box">
[B][COLOR=DarkGreen]<a[/COLOR][/B] href="#"><img src="#" alt="Image Alt">[B][COLOR=DarkGreen]</a>[/COLOR][COLOR=Blue]<b></b>[/COLOR][/B]
</div>
</body>
</html>