By seismicmike on
Hey. I apologize if this seems obvious to anyone. I'm a noob.
Does anyone know if there is any way to use button images for the primary links (like as in sliced up images from a photoshop layout). My 'client' used an obscure font for the navigation and not wanting to force font downloads, I think images would be the best way to go. Is there any way to do this?
Would a custom block do it? Would I need to create a custom module?
Any help would be greatly appreciated! Thanks in advance.
Comments
You could either do it as a
You would do it by editing the CSS.
Create a menu, then in the theme files add the image as the background in the CSS.
Sounds like you want to
Sounds like you want to check out the Dynamic Rendering module which using sIFR allows for dynamic replacement of text using a specific font.
Image buttons as primary links
Hi.
Take a look at the code in one of the themes that uses a navigation bar for the primary links; there are quite a few.
You'll need to examine the theme's page.tpl.php and style.css to see how it's done.
Then use firebug to show you the CSS id's for each button and edit your theme's CSS accordingly.
Pete.
There are many options for image replacement for navigation
I would suggest looking at all the possible options for using background images for links, it is always advised to use background images and utilising the existing text strings for w3c standards and screen reader compatibility.
I have an example of how to implement the sprint technique on my website www.avangelistphotography.com look at the css and the source code for the top navigation list to see how this has been done using just one image which saves hassle with multiple image files but removes the use of original link text.
Web Developer
Music Photographer
themeable function
If I was going to use CSS, I would need to customize the menu function in order to include id's, right?
pbarnett, can you give me an example of a theme that does this that I could download and look at?
Thanks guys.
With tremors,
SeismicMike
theme_menu_links
This is the chap to override, I suspect; it's in includes/menu.inc, along with a few other useful themeable functions.
Pete.
Thanks Pete!With
Thanks Pete! That's a huge step in the right direction.
With tremors,
SeismicMike
Try this...
Thanks for that coding, I
Thanks for that coding, I can see what that is acheiving, I am not sure it will explain how you put links in a specific order though, or will it?
Web Developer
Music Photographer
You're welcome
The link ordering is determined by the item weights in the menu; the code is simply assigning a unique and sequential class for each link. Try it, and use Firebug to show the difference; the original code makes all the links the same class so you can't assign anything (background image, colour etc) to an individual link.
Pete.
subscribing
interested
This looks useful
I was trying to figure out how to add ids to the links but didn't manage.
I think there was a howto somewhere which didn't work...
Thanks
You're welcome
Give me a shout if you need any further help with this...
Pete.