Image Between Horizontal Menu Text

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Post Reply
slloyd
Forum Members
Forum Members
Posts: 195
Joined: Mon Apr 24, 2006 9:09 pm

Image Between Horizontal Menu Text

Post by slloyd »

I have a horizontal text menu that I'd like to add a small image to, but I can't figure out where to put the tag so it will display after each text link in the menu. Can someone guide me? TIA!

For example, I want it to look like this:

Home | About | Page | Page | Page

but the | I want to be an image.
tsw
Power Poster
Power Poster
Posts: 1408
Joined: Tue Dec 13, 2005 10:50 pm

Re: Image Between Horizontal Menu Text

Post by tsw »

put the image as a bg for the "a" element with css

something like

div#menu a {
background: transparent url('path/to/file.gif') no-repeat 0 0;
}
slloyd
Forum Members
Forum Members
Posts: 195
Joined: Mon Apr 24, 2006 9:09 pm

Re: Image Between Horizontal Menu Text

Post by slloyd »

Thanks. Actually, I have that in the stylesheet, but what I noticed is I also had a in there, which was making it NOT appear. I need to use that for the first menu item (so the image doesn't appear before the first menu item), but I'm not sure where to put it. Any ideas?
slloyd
Forum Members
Forum Members
Posts: 195
Joined: Mon Apr 24, 2006 9:09 pm

Re: Image Between Horizontal Menu Text

Post by slloyd »

Anyone have any ideas?

I've since removed the image since I couldn't figure out how to remove the image from appearing in front of the first menu item.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Image Between Horizontal Menu Text

Post by Dr.CSS »

Do you have a link so we can look at some code?...
slloyd
Forum Members
Forum Members
Posts: 195
Joined: Mon Apr 24, 2006 9:09 pm

Re: Image Between Horizontal Menu Text

Post by slloyd »

Sure. Here it is:

http://schoolrockinc.com

Remember, I took out the image code in the CSS. I just need to know how to make the image NOT display before the first menu item or after the last item.

Thanks!
Last edited by slloyd on Tue Jul 03, 2007 2:27 pm, edited 1 time in total.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Image Between Horizontal Menu Text

Post by Dr.CSS »

If you make a menu template out of the one you use now and put id="a{$node->id}"  in the li or a call it will give you a diff. id for each menu item then you can use CSS to input the image...

You need the a in front of the id call because it will render the id as a number and you cant use numbers in CSS...
Post Reply

Return to “Layout and Design (CSS & HTML)”