Closed (fixed)
Project:
SimpleMenu
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
1 Dec 2006 at 23:04 UTC
Updated:
7 May 2010 at 13:56 UTC
Hello all,
I'm using the bluemarine theme for a website i cretae and i need to replace the menu links with icons.
The rendered HTML shows something like the following output:
I need to change that to something like:
The problem is I'm no coder. I've managed to get to menu.inc file in /includes where most of the relevant functions reside (like theme_menu_item_link) but i'm stuck there.
I can't find where the actual text is created in order to replace it.
Could someone help me on that?
Thanks in advance
Comments
Comment #1
or1onas commentedSorry about the first post's wrong exmples. Here's the correct ones:
This is the rendered HTML i see:
<li class="leaf14"><a href="/drupal-4.7.3/admin/access" title="">access control</a></li>And this is what i want to do:
<li class="leaf14"><a href="/drupal-4.7.3/admin/access" title=""><img src="image.jpg"></img></a></li>Thanks once again in advance
Comment #2
m3avrck commentedBest way to do this is with CSS. Don't hard code the image. But use a CSS image replace technique. Google for more info on how to do that.
If you need a specific class for a specific link and it doesn't work, might have to wait till 5.0 where this has been fixed.
Comment #3
or1onas commentedThanx a lot for the tip. I'll try that :-)
Comment #4
or1onas commentedI tried it but i have a problem cause the text link is displayed in front of the image.
If i set a display:none in .css, the hyperlink disappears?
Any tip on this?
Comment #5
quicksketchTry something like this in your CSS:
Despite that ugly -9999px, this is common practice and safe for all browsers.
Comment #6
or1onas commentedI found out about it by googling a bit.
Thanks a lot for the tip though ;-)
Comment #7
quicksketchComment #8
xalexas commentedJust add overflow:hidden and put smaller indent. That way you will not have ugly dashed line selection that is wide 9999px.