PDA

View Full Version : css drop down menu



Daimz
April 3rd, 2008, 10:08 PM
I am making a CSS drop down menu and I have got it working but I have one problem.
I have 3 buttons but only 2 of them do I want to actually have a drop down. The 'home' button I just want to be the button.
Here is what I am making menu.html.zip (http://www.kirupa.com/forum/attachment.php?attachmentid=45959&stc=1&d=1207274811)
But if I give the home button a link it picks up the style of the links of the drop down. and I can't seem to figure out why. I have tried changing the css from:
#dropdown a
to
#dropdown ul li a
and even tried directing the style of the H2 tag with the header link
#dropdown ul h2 a

But I honestly dont really know how to fix the problem and would really appriciate some advice.
Cheers

fasterthanlight™
April 4th, 2008, 11:02 AM
Here,

I commented it up too to show you what i did

fasterthanlight™
April 4th, 2008, 11:26 AM
The problem was, you had 3 identical unordered list structures, and were styling all three of them at once, so I gave the two dropdown uls their own class, styled those two THROUGH the class I added,

and I gave "Home" its own class and styled that seperatly.

Daimz
April 5th, 2008, 01:36 AM
wow that was so helpful. Thanx so much I didn't even think I could add class"s to <ul> (don't know why maybe just a daft moment) but I had been trying things like adding the class to the <a> tag or the <h2> tag and that didn't work clearly so thanx so much really appreciate it I thought I was going to have to use the spry widget which I didn't really want to do because I wanted to make my own. So thanx again huge help and very appreciated.

fasterthanlight™
April 6th, 2008, 05:20 PM
;)