EDIT
OK I think I found a solution, found on http://www.student.oulu.fi/~laurirai/www/css/middle/
I used the absolute positioning technique.
I hope it works in IE because I can't check it right now...
The CSS is updated.
END EDIT
I have a language selector in a select box.
On the left side of the box I want a flag with a active language. This will be changed with javascript when the language get's changed.
Only thing that remains is to horizontally align the flag with the select box with CSS - cross browser.
CSS:
.combo {
background: silver;
margin: 10px 0;
position:relative;
height: 50px;
}
.combo span {
position:absolute;top:0;bottom:0;margin:auto;
display: block; float: left;
width: 16px; height: 11px;
background:url('flags.png') no-repeat;
}
.combo select {
position:absolute;top:0;bottom:0;margin:auto;
margin-left: 25px;
}
.combo span.flag-es {background-position: -16px 0}
.combo span.flag-fr {background-position: -32px 0}
.combo span.flag-gb {background-position: 0 -11px}
.combo span.flag-it {background-position: -16px -11px}
.combo span.flag-nl {background-position: -32px -11px}
HTML:
<div class="combo">
<span class="flag-it"></span>
<select>
<option value="Italiano" selected>Italiano</option>
<option value="English">English</option>
<option value="Français">Français</option>
<option value="Español">Español</option>
<option value="Nederlands">Nederlands</option>
</select>
</div>