close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Can't get current state to work

Thread began 8/29/2009 6:57 am by william279633 | Last modified 9/04/2009 10:27 am by william279633 | 2904 views | 8 replies |

william279633

Can't get current state to work

I have read the messages in the forum about this but nothing seems to suggest an answer.
Here is the code for the Nav of my About page. When previewed all menus look and act the same. I spec'd a different BkGnd color in my menu.css file so it would show the iewer they are on the about page. - see the a.current code after the html.:

<div id="nav">
<ul class="level-0" id="cssmw">
<li><a href="index.htm">Home</a></li>
<li class="parent"><a href="#link">Portfolio</a>
<ul class="level-1">
<li><a href="painting.html">Painting</a></li>
<!--<li><a href="drawing.html">Drawings</a></li>-->
</ul>
</li>
<li class="current"><a href="#">About</a></li>
<li><a href="price.html">Price List</a></li>
<li><a href="contact.html">Contact</a></li>
</ul>
<script type="text/javascript">if(window.attachEvent) { window.attachEvent("onload", function() { cssmw.intializeMenu('cssmw',{select_current: 0, orientation: 2}); }); } else if(window.addEventListener) { window.addEventListener("load", function() { cssmw.intializeMenu('cssmw',{select_current: 0, orientation: 2}); }, true); }</script>


menu.css code for the a.current tag:

ul#cssmw > li.current > a.current {
background-color: ##7BA5AD;
color: #2D2B2E;
font-weight: bold;
text-decoration: none;
}

Can you suggest an answer?
Thanks

William

Sign in to reply to this post

Jason ByrnesWebAssist

Hard to tell what is wrong from the menu and CSS Snippet you have provided. can you post a link to a page that displays the error so I can troubleshot the problem in context.

Sign in to reply to this post

william279633

page link

This post has been deleted.

william279633

page link

Jason,

Here is an example of a page from the site that doesn't respond with a current state. There is no error message just no high light color behind current menu for home page

The CSSMENU FOLDER is located at cssmw

home.html

Thanks for any help you can provide.
I attached the cssmw folder

WM

Attached Files
cssmw.zip
Sign in to reply to this post

Jason ByrnesWebAssist

In the menu.css file try changing:


ul#cssmw > li.current > a.current {
background-color: #7BA5AD;
color: #2D2B2E;
font-weight: bold;
text-decoration: none;
}


to:

ul#cssmw > li.current > a {
background-color: #7BA5AD;
color: #2D2B2E;
font-weight: bold;
text-decoration: none;
}

Sign in to reply to this post

william279633

suggestion

Jason,
Thanks for taking the time to look at this. I replaced the code as suggested but still no background change for current state on page.


Wm

Sign in to reply to this post

Jason ByrnesWebAssist

When I view source of your menu.css, I still see:
ul#cssmw > li.current > a.current {
background-color: #7BA5AD;
color: #2D2B2E;
font-weight: bold;
text-decoration: none;
}


It needs to be changed to:
ul#cssmw > li.current > a {
background-color: #7BA5AD;
color: #2D2B2E;
font-weight: bold;
text-decoration: none;
}

Sign in to reply to this post

william279633

a partical solution

Jason,
Sorry, I was testing locally and didn't update the server. I was trolling around the forum and found an example of a site that had the current state working. Again i was doing this locally.
I added the class="link" to the <li> and class="link current" to the <ahref>link that is the current page. I followed the example and it worked on the level0 menu but not the level1 secondary menu.
this code remained the same:
ul#cssmw > li.current > a.current {
background-color: #7BA5AD;
color: #2D2B2E;
font-weight: bold;
text-decoration: none;
}
:

<div id="nav">
<ul class="level-0" id="cssmw">
<li class="link current"><a class="link current"href="index.html">Home</a></li>
<li class="parent"><a href="#link">Portfolio</a>
<ul class="level-1">
<li class="link"><a class="link"href="painting.html">Painting</a></li>
<!--<li class="link"><a class="link"href="drawing.html">Drawings</a></li>-->
</ul>
</li>
<li class="link"><a class="link"href="about.html">About</a></li>
<li class="link"><a class="link"href="price.html">Price List</a></li>
<li class="link"><a class="link"href="contact.html">Contact</a></li>
</ul>

wm

Sign in to reply to this post

Jason ByrnesWebAssist

If you try my suggestion, I believe it will work for all menu levels.

Sign in to reply to this post

william279633

Jason,
By adding the claas="link current to the <li> and ahref of the level 1 link I got it to work for all menus. THanks for your help.

wm

<div id="nav">
<ul class="level-0" id="cssmw">
<li class="link"><a class="link"href="index.html">Home</a></li>
<li class="link current"><a class="link current"href="painting.html">Portfolio</a>
<ul class="level-1">
<li class="link current"><a class="link current"href="painting.html">Painting</a></li>
<!--<li class="link"><a class="link"href="drawing.html">Drawings</a></li>-->
</ul>
</li>
<li class="link"><a class="link"href="about.html">About</a></li>
<li class="link"><a class="link"href="price.html">Price List</a></li>
<li class="link"><a class="link"href="contact.html">Contact</a></li>
</ul>

Sign in to reply to this post
loading

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