phingko
07-12-2011, 01:44 PM
I have this simple yet frustrating problem regarding my link css.
I know what's the problem is but can't seems to fix it.
I develop a website using Joomla 1.6 and working on the menu and sub menu.
I want the menus have hover and active state and for the submenu it's working great but the menu itself, it doesn't work at all. The hover can work but not the active state.
This is the html looks like
<ul class="the_menu">
<li id="current" class="active parent item131">
<a class="food-service-desc active" href="/Joomla4/index.php/food-service-desc">
<img class="art-menu-image" src="/Joomla4/images/food.jpg" alt="food service desc" /></a>
<ul class="category">
<li class="item133">
<a href="/Joomla4/index.php/food-service-desc/nigiri-top">
<img class="art-menu-image" src="/Joomla4/images/nigiri.jpg" alt="Nigiri Top" /></a>
</li>
<li class="item134">
<a href="/Joomla4/index.php/food-service-desc/sliced-sushi-rolls">
<img class="art-menu-image" src="/Joomla4/images/sliced.jpg" alt="sliced sushi rolls" /></a>
</li>
<li class="item135"><a href="/Joomla4/index.php/food-service-desc/others">
<img class="art-menu-image" src="/Joomla4/images/other.jpg" alt="others" /></a></li>
</ul>
</li>
<li class="item132">
<a href="/Joomla4/index.php/retail-desc">
<img class="art-menu-image" src="/Joomla4/images/retail-text.jpg" alt="retail desc" /></a></li></ul>
The problem here is the second line, <li id="current" class="active parent item131">
right now my css is like this
li.item131 {
width:142px;display: block;
overflow: hidden;
}
ul .the_menu li #current a {
margin-left:-142px; overflow:visible;
}
li.item131 a:hover {
display:block; margin-left:-142px; overflow:visible;
position: relative;
}
As you can see the first state is too global that it overrides the css when the li is current.
Can anyone give any suggestion how to fix it?
I have tried many ways but still can't figured it out after two whole days.
Help please.
Thanks a lot
I know what's the problem is but can't seems to fix it.
I develop a website using Joomla 1.6 and working on the menu and sub menu.
I want the menus have hover and active state and for the submenu it's working great but the menu itself, it doesn't work at all. The hover can work but not the active state.
This is the html looks like
<ul class="the_menu">
<li id="current" class="active parent item131">
<a class="food-service-desc active" href="/Joomla4/index.php/food-service-desc">
<img class="art-menu-image" src="/Joomla4/images/food.jpg" alt="food service desc" /></a>
<ul class="category">
<li class="item133">
<a href="/Joomla4/index.php/food-service-desc/nigiri-top">
<img class="art-menu-image" src="/Joomla4/images/nigiri.jpg" alt="Nigiri Top" /></a>
</li>
<li class="item134">
<a href="/Joomla4/index.php/food-service-desc/sliced-sushi-rolls">
<img class="art-menu-image" src="/Joomla4/images/sliced.jpg" alt="sliced sushi rolls" /></a>
</li>
<li class="item135"><a href="/Joomla4/index.php/food-service-desc/others">
<img class="art-menu-image" src="/Joomla4/images/other.jpg" alt="others" /></a></li>
</ul>
</li>
<li class="item132">
<a href="/Joomla4/index.php/retail-desc">
<img class="art-menu-image" src="/Joomla4/images/retail-text.jpg" alt="retail desc" /></a></li></ul>
The problem here is the second line, <li id="current" class="active parent item131">
right now my css is like this
li.item131 {
width:142px;display: block;
overflow: hidden;
}
ul .the_menu li #current a {
margin-left:-142px; overflow:visible;
}
li.item131 a:hover {
display:block; margin-left:-142px; overflow:visible;
position: relative;
}
As you can see the first state is too global that it overrides the css when the li is current.
Can anyone give any suggestion how to fix it?
I have tried many ways but still can't figured it out after two whole days.
Help please.
Thanks a lot