CSS Menu Designer: using background...

User 494969 Photo


Registered User
5 posts

I want to use transparent images to provide some depth to my menus:
    default to horiz-menu-bg.png
    on mouseover/ hover use horiz-menu-hover.png)
does anyone know where in the css file (css/menuname-menu.css) I need to insert them? I thought that putting them where the BG colors go would do it, but it doesn't.
thanks!
doug
User 38401 Photo


Senior Advisor
10,951 posts

Hiya Douglass,

I plugged into Google the phrase "how to make a css menu" and came up with quite a few hits on tutorials and already made css menus. Here's a link to one that has some instruction on how to create them and how to vary what you use from colors to images. Hope this helps :) DO put that phrase in google and surf around a few more if this doesn't do the trick, I'm sure there are lots out there that help with this. Many here know these answers too hehe, but since I don't... I google LOL :P

http://www.scottklarr.com/topic/88/how- … -css-menu/
User 184085 Photo


Ambassador
1,707 posts

.menuname a:hover, .menuname a:active (for hover background)

and I think

.vifc-menu, .vifc-menu * (for the menu background)

surprised that where the background color was didn't work, did you insert something like?

background-image:url('../images/menu_background_hover.png');
Volunteering to help :)
http://www.tbaygeek.ca
My HTML play area
http://www.tbaygeek.ca/test/
User 494969 Photo


Registered User
5 posts

thanks! and yes, that is what I had tried. process of trial and error.....
User 494969 Photo


Registered User
5 posts

argh. So when I insert into the css file
.MenuTopNav-menu a {
display:block;
position:relative;
background-image: url('images/horiz-menu-bg.png');
background-repeat: repeat-x;}

nothing happens. But if delete the link to css and just embed the same code in the html <style..

it works fine. So for me, this issue remains open, but I have a work around.
doug
User 38401 Photo


Senior Advisor
10,951 posts

Have a link Douglass? Or maybe post your code here for people to help with, that usually is the best way to be sure you get the right answers :)
User 184085 Photo


Ambassador
1,707 posts

i'm guessing your css file is in a directory with other css files, so the path url('images/horiz-menu-bg.png'); that works on the page, might have to be changed to url('../images/horiz-menu-bg.png');
to make it work in the css file :)

paths are relative :)
Volunteering to help :)
http://www.tbaygeek.ca
My HTML play area
http://www.tbaygeek.ca/test/

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.