Add a PDF icon to anchor links

In your PHP code add the following line:

$html = eregi_replace (‘<a href=”([a-z0-9./-_ ]+.pdf)”>’, ‘<a href=”\1″ class=”pdf”>’, $html);

And in your CSS file:

background:url(../images/pdf_icon.gif) bottom right no-repeat;

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s