I have a line with icon fonts (Font Awesome). On hover I want the font size increased (bigger icon) while keeping the icon centered within the line (both horizontal and vertical) and the remaining icons should retain their size and position.
HTML:
<div id="container" class="class1">
<span class="fa fa-square-o class2"></span>
<span class="fa fa-square-o class2"></span>
<span class="fa fa-square-o class2"></span>
<span class="fa fa-square-o class2"></span>
</div>
CSS:
.class1 {
font-size:2em;
line-height:2em;
}
.class2:hover {
font-size:1.2em;
}
JSFiddle: http://jsfiddle.net/8LLtg5sf/2/
I can't find the proper settings for margin etc. Help!
Try scaling it instead:
http://jsfiddle.net/8LLtg5sf/6/