OZONE Asylum
Forums
Stupid Basic HTML
CSS Menu Not Doing as it's Told!
This page's ID:
28918
Search
QuickChanges
Forums
FAQ
Archives
Register
Edit Post
Who can edit a post?
The poster and administrators may edit a post. The poster can only edit it for a short while after the initial post.
Your User Name:
Your Password:
Login Options:
Remember Me On This Computer
Your Text:
Insert Slimies »
Insert UBB Code »
Close
Last Tag
|
All Tags
UBB Help
I started making popout CSS menus yesterday and the code is mystifying me. It's like my text doesn't want to obey it and whatever I do doesn't make sense. The following HTML code: <div id="menu"> <ul> <li><a href="index2.html">Index</a></li> <li><a href="what.php">What is this?</a></li> <li><a href="who.html">Who are you?</a></li> <li><a href="images.php"Images</a></li> <li><a href="blog.php">Blog</a> <ul> <li><a href="blog.php?2007">2007</a> <ul> <li><a href="blog.php?jan">January</a> <ul> <li><a href="blog.php?15">15</a> </li> </ul> </li> <li><a href="blog.php?feb">February</a></li> </ul> </li> </ul> </li> <li><a href="index.php?links">Links</a></li> <li><a href="index.php?info">Information</a></li> <li><a href="index.php?people">People</a></li> <li><a href="images.html">Webcam</a></li> </ul> </div> Added with my CSS code: #menu { position: absolute; top: 280px; left: 10px; width: 12em; /* set width of menu */ background: #7d977a; } #menu ul { /* remove bullets and list indents */ list-style: none; margin: 0; padding: 0; } #menu a { color: #000; background: #7d977a; text-decoration: none; display: block; } #menu li { /* make the list elements a containing block for the nested lists */ position: relative; } #menu ul ul ul { position: absolute; top: 0; left: 100%; /* to position them to the right of their containing block */ width: 100%; /* width is based on the containing block */ } div#menu ul ul ul, div#menu ul ul li:hover ul ul {display: none;} div#menu ul ul li:hover ul, div#menu ul ul ul li:hover ul {display: block;} #menu a:hover { color: #7d977a; background: #000; } Somehow manages to list "2007" underneath "Blog" when it should pop out from it. Whereas, if I put an extra <ul> at the start of my menu, (when I make the "Blog" item into it's own menu on a different document) then "2007" pops out from "Blog" but then the "15" pops out from "January" without me hovering over it (when I'm hovering over "2007"). I can't see what I'm doing wrong! I've been double checking my code against the tutorial code and it just does not make sense to me. The tutorial I used is at: http://www.tanfa.co.uk/css/examples/menu/tutorial-v.asp The World is Made in Desperation, and I am a Desolate Spirit - The Misery
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »