alright, so this is a basic list-based DHTML drop down navigation menu. the old script I had was rather static in it's methods (it used names rather than dealing with the concept itself) in other words it was built for a specific instance.
I'm getting to the point where I'm tired of it, so I'm trying to move to a dynamic script that will build whatever I want it to dynamically. so I'm trying to use nodes.
the problem is apparently not in the syntax (I'm not getting those little yellow error messages in the corner) it's somewhere in the script itself that is not applying itself to what I want it to. ie, nothing happens onMouseOver.
Code:* html ul li { float: left; } * html ul li a { height: 1%; } ul { margin: 0; padding-right: 15px; list-style: none; } ul li { position: relative; font-color: #0000ff; list-style: none; background-color:blue; } li ul { display:none; list-style:none; position: absolute; padding: 20px; top: 45px; left: 0px; width: 60px; font-color: #0000ff; } li:hover ul { display:block; } li a:hover ul { display:block; } li ul:hover, li a ul:hover { display:block; } that's basically what I have (without putting in all of the rest of the just aesthetic things to change the menu.
It works by using the display element in css. You will notice that some points use display:none and then later in the same parts hover it uses display:block. So basically your menu exists in full on your page and then it uses the css hover element to make certain parts of it show-up.
Check out this article: http://alistapart.com/articles/hybrid
lol I actually tried that one once. Just I'm trying to learn how to develop my own. I just need to know the specific css way to make something pop out on a hover. It's not working in my browser for some reason, and I can't test it in others. I'm trying to make it all css since, as Pleaseremove pointed out, javascript can be turned off, and that is my main navigation.
Quote: from Echo one at 12:55 am on Jan. 20, 2008 Quote: from pleaseremove at 6:11 am on Jan. 15, 2008 OK, I'm not actually sure what you want your code to do here. Is this just a drop-down menu? Anyway, if it is you should be doing this with CSS, the last thing you want to do is make the core way people navigate with your site based on something that could be turned off. it's a mix of css and javascript. I'm aware that that poses problems but I'm not sure there's a way to do this without some javascript involved. At best I could store a lot of the info in the :hover attribute, but at the very least to my knowledge the display attribute has to be changed with javascript since the act of displaying involves the mouseover of a different object. keep in mind that I have a script that works, but it deals only with specific instances ie. this is what happens when this. This one, I'm trying to make it apply to any instance of a drop down or otherwise onMouseOver display menu by saying that anyLi.onMouseOver = display sublist if one exists. Sounds like you want to look into something like this: http://www.tjkdesign.com/articles/keyboard_friendly_dropdown_menu/default.asp
Quote: from pleaseremove at 6:11 am on Jan. 15, 2008 OK, I'm not actually sure what you want your code to do here. Is this just a drop-down menu? Anyway, if it is you should be doing this with CSS, the last thing you want to do is make the core way people navigate with your site based on something that could be turned off. it's a mix of css and javascript. I'm aware that that poses problems but I'm not sure there's a way to do this without some javascript involved. At best I could store a lot of the info in the :hover attribute, but at the very least to my knowledge the display attribute has to be changed with javascript since the act of displaying involves the mouseover of a different object. keep in mind that I have a script that works, but it deals only with specific instances ie. this is what happens when this. This one, I'm trying to make it apply to any instance of a drop down or otherwise onMouseOver display menu by saying that anyLi.onMouseOver = display sublist if one exists.
OK, I'm not actually sure what you want your code to do here. Is this just a drop-down menu? Anyway, if it is you should be doing this with CSS, the last thing you want to do is make the core way people navigate with your site based on something that could be turned off.
Anyway, if it is you should be doing this with CSS, the last thing you want to do is make the core way people navigate with your site based on something that could be turned off.
it's a mix of css and javascript. I'm aware that that poses problems but I'm not sure there's a way to do this without some javascript involved. At best I could store a lot of the info in the :hover attribute, but at the very least to my knowledge the display attribute has to be changed with javascript since the act of displaying involves the mouseover of a different object.
keep in mind that I have a script that works, but it deals only with specific instances ie. this is what happens when this. This one, I'm trying to make it apply to any instance of a drop down or otherwise onMouseOver display menu by saying that anyLi.onMouseOver = display sublist if one exists.
Sounds like you want to look into something like this:
http://www.tjkdesign.com/articles/keyboard_friendly_dropdown_menu/default.asp
that would be great, except that site had no information on how to do a pure css dropdown menu. I've heard of them, and attempted them. But it comes down to needing to be able to use ul li:hover and idk if other browsers support it, but my ie for some reason does not.