 <p>To vertically align a text in a container, <a href="http://www.vanseodesign.com/css/vertical-centering/" rel="nofollow">multiple techniques</a> can be used. However, most of them have additional script calculation at runtime (if the height of the text container is changing) which can mess with the business logic.</p> <p>A hack can be used in your particular situation. You can add an image container with empty src inside your text container with <strong>100% height</strong> and <strong>0 width</strong> set by css.</p> <pre><code>&lt;label id="uppgift" class="uppgifter" style="display:inline-block;"&gt;&lt;img scr=""/&gt;Abc&lt;/label&gt; &lt;label id="uppgift2" class="uppgifter" style="display:inline-block;"&gt;&lt;img scr=""/&gt;123&lt;/label&gt; //and css .uppgifter img{ height:100%; width:0; } </code></pre> <p><strong><a href="http://jsfiddle.net/jQ6Ua/12/" rel="nofollow">Example</a></strong></p> <p>This way you would not have to write logic for additional added layers.</p>