Vertically aligning CSS :before and :after content
Posted
by danixd
on Stack Overflow
See other posts from Stack Overflow
or by danixd
Published on 2010-05-14T09:22:21Z
Indexed on
2010/05/14
9:24 UTC
Read the original article
Hit count: 199
css
I am trying to centre the link with the image, but can't seem to move the content vertically in any way.
<h4>More Information</h4>
<a href="#" class="pdf">File Name</a>
The icon is 22 x 22px
.pdf{ }
.pdf:before{padding:0 5px 0 0; content: url(../img/icon/pdf_small.png);}
.pdf:after{content: " ( .pdf )"; font-size: 10px;}
.pdf:hover:after{color: #000;}
© Stack Overflow or respective owner