Align elements inside an tag vertically

<p>I have an <code><a></code> tag (which is part of multiple <code><li></code> tags). In the <code><a></code> tag I have an <code><i></code> tag and some text - the text of the link.</p><p>What I would like to achieve is to have the icon on top and the text under it (and then centered). So it would look like:</p><pre><br /><code> ICON<br />MYTEXTHERE<br /></code><br /></pre><p>However they are always placed next to each other. I tried using <code>display: inline-block</code> - because my <code><a></code> is <em>inline</em> and the content inside should be <em>block</em> but without success.</p><p>The fiddle is here: <a href="http://ift.tt/1mFkDBp" rel="nofollow">http://ift.tt/1mFkDBp</a></p><br /><h2>Click here view more answers <a href="%20http://stackoverflow.com/questions/34470462/align-elements-inside-an-a-tag-vertically">http://ift.tt/1YHObKm</a></h2>

Nhận xét

Bài đăng phổ biến từ blog này

Align div to bottom of the page in bootstrap

Javascript is unable to stop page loading