Image instead of "Email this" text

jiakomo - March 26, 2008 - 10:51
Project:Forward
Version:5.x-1.12
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed
Description

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

#1

drupalina - April 2, 2008 - 11:38

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.

#2

drupalina - April 2, 2008 - 12:30

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.

#3

seanr - April 10, 2008 - 16:46
Status:active» closed

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;
}

#4

Jonga - May 16, 2008 - 08:21

#5

Jonga - May 16, 2008 - 08:24
Status:closed» active (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

#6

seanr - June 6, 2008 - 20:44
Status:active (needs more info)» closed

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.

 
 

Drupal is a registered trademark of Dries Buytaert.