close ad
 
Important WebAssist Announcement
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 9:42 am by markhaynes75235 | Last modified 6/03/2011 9:24 am by markhaynes75235 | 3591 views | 7 replies

Mike Perry

I'm having trouble implementing this with current pseudo-class.

The following code works for the basic link and for the hover pseudo-class:

ul#cssmw > li#productsNav {
background-image:url(../../images/productsRed.png);
background-repeat:no-repeat;
background-position:center;
}

ul#cssmw > li#productsNav:hover {
background-image:url(../../images/productsWhite.png);
background-repeat:no-repeat;
background-position:center;
}



The following code fails to change the background image for the current pseudo-class:

ul#cssmw > li#productsNav:current	{
background-image:url(../../images/productsWhite.png);
background-repeat:no-repeat;
background-position:center;
}



The address bar includes products.php; the menu.php code follows:

php:
<?php

$WA_menuDir 
getcwd();
chdir(dirname(__FILE__));
require_once(
"../../webassist/framework/library.php");
require_once(
"../../webassist/framework/framework.php");
chdir($WA_menuDir);
$WA_Menu = new WA_Include(__FILE__);
?>
<ul class="level-0" id="cssmw">
<li id="recipeNav" style="width:130px;"><a href="../../recipe.php"></a></li>
<li id="performanceNav" style="width:200px; text-align:center;"><a href="../../performance.php">Performance</a></li>
<li id="tasteNav" style="width:100px;"><a href="../../taste.php">Taste</a></li>
<li id="productsNav" style="width:140px;"><a href="../../products.php">Products</a></li>
<li id="buyNav" style="width:180px;"><a href="../../wheretobuy.php">Buy</a></li>
</ul>

<script type="text/javascript">if(window.attachEvent) { window.attachEvent("onload", function() { cssmw.intializeMenu('cssmw',{select_current: 0, orientation: 1}); }); } else if(window.addEventListener) { window.addEventListener("load", function() { cssmw.intializeMenu('cssmw',{select_current: 0, orientation: 1}); }, true); }</script>
<?php
$WA_Menu
->Initialize(true);
echo(
$WA_Menu->Body);
?>



Help??

Mike

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...