Is it possible to use an image instead of the "Email this !type" text?

Comments

drupalina’s picture

subscribing

(my guess would be some kind of CSS ... background: transparent url(/img/forward-to-a-frend.png) ... or something like that...)

if anybody has the full CSS command please post here.

drupalina’s picture

here's the CSS code that worked for me. Just put it in your style.css

.links a.forward_links{
background: url(img/email.png) no-repeat;
padding: 1px 0 0 20px;
}

Of course this assumes that you have an "img" folder which contains an icon called email.png . Change it as you like.

seanr’s picture

Status: Active » Closed (fixed)

That's the easiest way to do it. If you want to then hide the text, you can do it like this:

.links a.forward_links{
background: url(img/email.png) no-repeat;
padding: 1px 0 0 20px; /* left padding = width of image */
width:1px; /* image will be visible in the padding area and text will be clipped */
overflow:hidden;
}

chandrabhan’s picture

chandrabhan’s picture

Status: Closed (fixed) » Postponed (maintainer needs more info)

Its not working for me for some reason. My theme is Twilight and the text is not getting replaced. Also I am getting the image at least only if I use (however the text remains):

.links li.forward_links

or

.links a.forward-page

My drupal version 6 and module version is 6.x-1.x-dev

seanr’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

It'll obviously depend on your theme, and I suspect the link classes may have changed in Drupal 6. Your best bet is to inspect the link with Firebug in Firefox and find the class name that way.