| Winterwolf on Dec 21, 2005 at 9:17:38 AM (# 3) try thinking about display="none" display="block" and see if that gets you anywhere. jordan8201 on Dec 21, 2005 at 11:38:48 AM (# 4)Sorry, but I am so new to CSS that the last reply doesn't help me much. This is my current page that I am working on, and I just want to add the menu below it. My site is www.mzbc.com/test.htm. Any help would be great. Thanks.
Jedidiah ctcrmcou on Dec 21, 2005 at 11:43:46 AM (# 5)You got help. And good help. You're just lazy. jordan8201 on Dec 21, 2005 at 11:57:23 AM (# 6)I'm not sure what you mean? I didn't realize that I had to be an expert to post in site-experts. Does it make me lazy that I am not familiar with the code Winterwolf mentioned? I never said it was not good help, I just do not know to use the information he gave. philcha on Dec 22, 2005 at 2:21:07 AM (# 7) This message has been edited.jordan8201, "If you give a man a fish he will have a single meal. If you teach him how to fish, he will eat all his life." In other words, in you are better off if you learn how to use the relevant techiques so you can use them to solve other problems. Most modern menus require knowledge of CSS, and you'll need that knowledge for many other Web development tasks: - Google for "css menu". You may find something you can just copy and use - perhaps even something you like better than your original idea (it's happened to me). You will certainly find pages which explain very well how such menus work - so well that there's no point in our trying to explain.
- Google for "css course tutorial" and "css reference" and bookmark whichever course(s) and reference(s) you like. Those bookmarks will be your fishing lines.
Winterwolf on Dec 22, 2005 at 9:57:43 AM (# 8)Jordan, sorry to confuse you. Hope this doesnt confuse you more.
what I meant: In css you can cause block level elements to disappear and reappear via use of display:none; or in javascript display="none";
consider the following code (which might not apply exactly to your needs)
first the HTML:
<body> <input type="button" value="click me" onclick="toggleMsg('hiddenMessage')" /> <div id="hiddenMessage" class="hmsg">Hi There. This was hidden.</div> </body>
then lets look at the CSS:
<style type="text/css"> .hmsg{display: none;} </style>
and finally some javascript to handle the event of clicking the button:
<script type="text/javascript"> function toggleMsg(sID)//toggles the display of the hidden message on and off... { if(document.getElementById(sID))//check to see if the element exists { if(document.getElementById(sID).style.display="none") //check to see if it is undisplayed { document.getElementById(sID).style.display="block";//if is display it else turn the display off. } else { document.getElementById(sID).style.display="none"; } } } </script>
hope this helps :) philcha on Dec 23, 2005 at 3:36:52 AM (# 9) This message has been edited.I decided so long ago not to use drop-down / fly-out menus that I'd forgotten why I don't like them. Here's what I think are the big disadvantages of drop-down menus (laid out horizontally across the page) - In the pure CSS versions, the lower-level menus always offset in the same direction from their parent items, usually to the right. This can put the user in a no-win situation where a low-level menu is off past the right side of the page but the user can't use the horizontal scroll bar because when he / she tries the menu collapses and the horizontal scroll bar disappears. Try viewing this example after reducing the width of your browser window and you'll see what I mean.
- DHTML (Javascript-driven) drop-down menus can calculate where they are and offset lower-level menus back into the screen (as Windows menus do), but:
- If the user has disabled Javascript, the drop-down functionality doesn't work. Then you have to create a links page for each menu item which contains a sub-menu.
- The code is complex, so it takes a while to load and is difficult to maintain.
Menus arranged vertically down the left edge of the page (so sub-menus appear to the right of thier parents and are oriented vertically) can have a similar problem with scrolling down past the bottom of the window. If you want to present a menu that's so big it needs to be able to expand and collapse, I recommend a tree menu (works like Windows Explorer or many email programs) down one side of the page - see css-discuss
This type of menu appears fully expanded if Javascript is disabled.
|