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: 193

Filed under:

I am trying to centre the link with the image, but can't seem to move the content vertically in any way.

http://img693.imageshack.us/img693/6207/picture2pc.png

<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

Related posts about css