dalearyous
Senior member
so i know how to do exactly what i need when i am using standard html pages in my navigation. however, this particular site has 1 html file/page and all the "interior pages" are just inside divs with a unique ID and the navigation jumps to them with a nice jquery scroller.
how do i set an active state so that when one DIV is clicked on the button changes to an active state? my navigation uses the CSS sprite technique ... very close to this guide: http://www.sohtanaka.com/web-design/active-state-in-css-navigations/
normally this works:
CSS:
HTML:
but instead of href=" .html" it obviously has this instead: href="#home" etc...
how do i set an active state so that when one DIV is clicked on the button changes to an active state? my navigation uses the CSS sprite technique ... very close to this guide: http://www.sohtanaka.com/web-design/active-state-in-css-navigations/
normally this works:
CSS:
Code:
/*Hover State*/
ul#topnav a:hover {
background-position: left -45px;
}
ul#topnav li.home a {
background-image: url(../images/menu/home_a.png);
width: 112px;
}
#home li.home a,
#howitworks li.howitworks a,
#aboutus li.aboutus a,
#faq li.faq a
{
background-position: left bottom;
height: 86px;
}
HTML:
Code:
<ul id="topnav">
<li class="home"><a href="index.html" class="panel">Home</a></li>
<li class="howitworks"><a href="howitworks.html" class="panel">How It Works</a></li>
<li class="aboutus"><a href="aboutus.html" class="panel">About Us</a></li>
<li class="faq"><a href="faq.html" class="panel">FAQ</a></li>
</ul>
but instead of href=" .html" it obviously has this instead: href="#home" etc...
Last edited: