close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Unique Background Image - horizontal menu

Thread began 6/02/2011 12:42 pm by markhaynes75235 | Last modified 6/03/2011 12:24 pm by markhaynes75235 | 1831 views | 7 replies

markhaynes75235

Unique Background Image - horizontal menu

Hi Jason et. al.!

I've got a horizontal CSS MenuWriter menu that's been working great for several months. One requirement that I've been asked to implement is to change our Donate button to a unique color at the root level of the menu. The code for the images in the menu is as follows:

ul#cssmw3 > li {
background-image: url("../cssmw3_images/left_act.gif");
background-position: left top;
background-repeat: no-repeat;
}
ul#cssmw3 > li > span {
background-image: url("../cssmw3_images/right_act.gif");
background-position: right top;
background-repeat: no-repeat;
display: block;
}
ul#cssmw3 > li > span > a, ul#cssmw3 > li > span > a:link {
background-image: url("../cssmw3_images/center_act.jpg");
background-repeat: repeat-x;
color: #F1F3F2;
display: block;
font-family: Geneva, Arial, Helvetica, sans-serif;
font-size: 10px;
font-style: normal;
font-weight: bold;
margin: 0 8px 0 8px;
padding: 5px 5px 5px 5px;
text-align: center;
text-decoration: none;
text-transform: uppercase;
width: 108px;
outline-style: none;
}
ul#cssmw3 > li:hover {
background-image: url("../cssmw3_images/left_hover_act.gif");
background-position: left top;
background-repeat: no-repeat;
}

ul#cssmw3 > li.hover {
background-image: url("../cssmw3_images/left_hover_act.gif");
background-position: left top;
background-repeat: no-repeat;
}

ul#cssmw3 > li.current {
background-image: url("../cssmw3_images/left_hover_act.gif");
background-position: left top;
background-repeat: no-repeat;
}
ul#cssmw3 > li:hover > span {
background-image: url("../cssmw3_images/right_hover_act.gif");
background-position: right top;
background-repeat: no-repeat;
display: block;
}

ul#cssmw3 > li.hover > span {
background-image: url("../cssmw3_images/right_hover_act.gif");
background-position: right top;
background-repeat: no-repeat;
display: block;
}

ul#cssmw3 > li.current > span.current {
background-image: url("../cssmw3_images/right_hover_act.gif");
background-position: right top;
background-repeat: no-repeat;
display: block;
}
ul#cssmw3 > li:hover > span > a, ul#cssmw3 > li:hover > span > a:link {
background-image: url("../cssmw3_images/center_hover_act.jpg");
background-repeat: repeat-x;
color: #273015;
font-weight: bold;
text-decoration: none;
outline-style: none;
}

ul#cssmw3 > li.hover > span > a, ul#cssmw3 > li.hover > span > a:link {
background-image: url("../cssmw3_images/center_hover_act.jpg");
background-repeat: repeat-x;
color: #273015;
font-weight: bold;
text-decoration: none;
outline-style: none;
}

ul#cssmw3 > li.current > span.current > a.current, ul#cssmw3 > li.current > span.current > a.current:link {
background-image: url("../cssmw3_images/center_hover_act.jpg");
background-repeat: repeat-x;
color: #273015;
font-weight: bold;
text-decoration: none;
outline-style: none;
}

As you can see, the background images are from slices and I have a default image set and a hover image set. I read a thread entitled "Main Menu Level - Different Backgrounds?" and tried the technique by editing the <li> tag in the menu.php file:

<li><span><a href="<url goes here>" target="_blank" style="background-image:url(../cssmw3_images/<image source file>)">Donate Now</a></span></li>

but when I load the page it still shows the original background from the menu.css.

Any help would be appreciated!

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...