Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Page & Category Menu Bars (http://forum.bytesforall.com/forumdisplay.php?f=10)
-   -   Adding an image to b/g of menu bar (http://forum.bytesforall.com/showthread.php?t=879)

nickcee Mar 19, 2009 08:21 PM

Adding an image to b/g of menu bar
 
Hi,

Can you tell me how I can add my .png image to the
background of my menu as well as the sub menu?

The .png is a transparent image. If there's a better way to make the b/g a transparent color please tell me. Thanks!

wrastler Mar 20, 2009 02:36 PM

I was just about to ask this as well!

Has anyone had any luck? I have a background.gif, have gone to the "Page Menu Bar/Background Color" but can't post the same url there. And since my background is a pattern, it is impossible to match with a simple background color.

Anyone had any success?

Thanks!

wrastler Mar 20, 2009 04:06 PM

Does this help...? Put this code into CSS inserts.

"That could be done with a background image

HTML Code:

ul.rMenu, ul.rMenu li {
background: #123456 url(/path/to/image.gif) repeat-x;
}

To have no image on sub levels

HTML Code:

ul.rMenu ul, ul.rMenu ul li {
background: #123456;
}

You might have to work on the positioning of the image, there are various techniques to do that, pixels, % or "top left" etc. http://www.w3schools.com/css/css_background.asp "

wrastler Mar 20, 2009 04:10 PM

The only problem with this solution is that it looks like one background is pasted on top of another....not very pretty..


Any other solutions to use the same background url gif for menu, footer, sidebar and main body background?

Flynn Apr 6, 2009 11:07 AM

Quote:

Originally Posted by nickcee (Post 3293)
Hi,

Can you tell me how I can add my .png image to the
background of my menu as well as the sub menu?

The .png is a transparent image. If there's a better way to make the b/g a transparent color please tell me. Thanks!

The menu items are

ul.rMenu li

The menu is

ul.rMenu


ul.rMenu li {
background: url(/path/to/image.gif);
}

nickcee Apr 13, 2009 09:59 PM

Thanks! I have the command working properly but now I realize that it would look better if the image is only active on mouseover. The way it looks right now isn't too nice.

Flynn Apr 14, 2009 07:18 AM

In that case use

ul.rMenu li a:hover {
background: ...
}

nickcee Apr 16, 2009 05:56 PM

It doesn't seem to be working now. I'm not sure why.

Flynn Apr 16, 2009 06:19 PM

Try this

ul.rMenu li:hover,
ul.rMenu li:sfhover {
background: ...
}

nickcee Apr 16, 2009 06:35 PM

It's still not working. Here's a link to my site.

www.edenintegrativehealth.com

The transparent b/g image is only showing up after the mouse goes over and leaves "Programs for men" under "Programs".

Flynn Apr 16, 2009 06:58 PM

I don't see any image applied at all. When you made the first post you were not a donor yet and I didn't look closely enough. If you just want to add transparency to the menu items, so that the background shines through, don't use images at all:

HTML Code:

ul#rmenu2 li:hover,
ul#rmenu2 li:sfhover {
    filter: alpha(opacity=40);
    -moz-opacity:.40;
    opacity:.40;
}

try with the <A> instead if this doesn't work or looks bad

HTML Code:

ul#rmenu2 li a:hover {
    filter: alpha(opacity=40);
    -moz-opacity:.40;
    opacity:.40;
}

Increase the values for less transparency

rinoa3108 Apr 27, 2009 08:21 AM

when adding the path to the code:

ul.rMenu li {
background: url(/path/to/image.gif);
}

do we add an absolute path? my images wont load up. also does it have to be a .gif?

Flynn Apr 27, 2009 07:52 PM

When you reference images through CSS Inserts always use absolute paths since the CSS Inserts are being inserted into the HEAD section of each page and with permalinks ON the CSS i.e. for single pages would be in subdirectories, so relative URLs won't work throughout the whole site


All times are GMT -6. The time now is 04:02 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.