hi folks,
i am creating this menu (for testing purpose) and i am facing two issue,
1.when i rollover the menu, the hover class is limited to the text only, i tried giving hover class display:block but it didn’t work.
2. there is some leftover of the background on the li which has a active class. here is the code
moreover i need some more help, i wanna have sub menu under about, lets say “My Bio” and “what i do”,but i want it hidden by default but when someone click on about the submenu open below about us, like a tree structure. how is that possible?
The anchor needs to be display:block but if you want it full width then you need the padding on the anchor and not on the list because that will make the anchor narrower.
#submenu ul {
width:100px
}
#submenu li {
list-style:none;
margin-bottom:10px;
background:#ffc666;
}
#submenu a {
color:white;
[B] padding:0 4px;
display:block;
width:92px;/* ie6 needs haslayout or won't hover over the whole block*/[/B]
}
#submenu a:hover {
background:#fcfb54;
}
#submenu a.current {
background:#666;
}
If you want subnavigation then you would nest another ul and then use some javascript to hide and show it when clicked.
Here’s a very basic example but there are some much better ones around. If you can’t manage it yourself then there are plenty of jquery menus around that will do the same.
Ah! i was able to fix it. i was using positioning. which makes the images stay there even if they are not there. so i removed the positioning and used margin-top:-80px to make the icons comes up and sit on the background bar. so this got me thinking, whereas positioning is somewhat cumbersome. is margin in negative value ok? without using positioning
Hello emaar,
If you remember I had coded that page for you once before. You got rather upset because some of your client info was left in the code I posted which resulted in the entire thread being deleted.
I did track it down in a google screenshot and I was able to recover the code. I am going to try this once again with you, I have removed all incriminating code from the page and used sample images and text in place of yours.
Here is a link to the original code with google friendly adjustments to it.