Click here to Skip to main content
Click here to Skip to main content

XP collapsible menu with description

By , 18 Nov 2002
 

Sample Image - MenuWithDescription.gif

Introduction

This is an update of my previous article (WindowsXP Style Menu) which creates a Windows XP look alike Panel Bar with the separation of structure, presentation and functions. Now this menu is updated to support transparent popup description for every link inside it.

Since this article uses the same code of the previous article, I just show here the structure (HTML) of the menu which you can just copy and paste to create as many submenus inside it as you need, without writing a single line of code.

The Structure (HTML)

The complete HTML is in the source code.

<!-- begin the menu -->
<div id="MainMenu">
  <!-- begin submenu -->
  <span>
    <div style="width:180">
      <table cellpadding="1" cellspacing="0" class="Menu_Head">
        <tr>
          <td width="90%">ASP.NET</td>
          <td><img src="down.gif" border="0">&nbsp;</td>
        </tr>
      </table>
    </div>
    <div class="Menu_Items">
      <div>
        <div>
          <a href="">User Controls</a>
          <div class="Description">
            <div class="DescTitle">User Controls articles</div>
            View all articles about User Controls
          </div>
        </div>
        <div>
          <a href="">Server Controls</a>
          <div class="Description">
            <div class="DescTitle">Server Controls articles</div>
            Tutorials show you how to write server controls
          </div>
        </div>
        <div>
          <a href="">Custom Controls</a>
          <div class="Description">
            <div class="DescTitle">Custom Controls articles</div>
            Tutorials show you how to write advanced custom controls
          </div>
        </div>
        <div>
          <a href="">Applications</a>
          <div class="Description">
            <div class="DescTitle">Applications</div>
            View all demo applications like guestbook, forum...
          </div>
        </div>
      </div>
    </div>
  </span>
  <!-- end sub menu -->
  ....

The structure is quite simple, the menu starts with the first <div> tag, each submenu is nested inside it with the <span> tag. The Submenu header (title) is nested inside the <div style="width:180"> and all the links are nested inside the <div class="Menu_Items">. After every link, you should have a <div> to contain its description, it will automatically show when you move the mouse over the link.

That's it for the menu. Hope this could help you a bit.

History

  • 19 November 2002

    Fixed an expanding bug: clicking too fast on the expand/collapse button will result in an extra white space of the submenu. Thanks to Obliterator for pointing it out.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

About the Author

Zek3vil
Singapore Singapore
Member
No Biography provided

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
Hint: For improved responsiveness ensure Javascript is enabled and choose 'Normal' from the Layout dropdown and hit 'Update'.
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page   
GeneralMENU WITH DESCRIPTIONmembernagen pnaja31 Aug '10 - 2:02 
Generaldoes not work in firfox ....memberhomano9 Nov '09 - 19:52 
Questionhave you find that there is a small bug in the script program?membergordengu17 Apr '07 - 15:29 
QuestionFirefox doesnt work!memberAboulmak9 Nov '06 - 22:15 
QuestionDoes anyone know how to do the same thing in ASP.NET ??memberconankunkid5 Oct '05 - 4:02 
AnswerRe: Does anyone know how to do the same thing in ASP.NET ??memberjay_dubal25 Feb '06 - 9:49 
QuestionHow to Hide all menu when loadedmemberPatrick Olurotimi Ige9 Jul '05 - 21:36 
GeneralNetscapememberscotthallett7 Apr '05 - 12:28 
QuestionHow to auto hide another when click one?memberthinhhangdieu30 Sep '04 - 17:17 
AnswerRe: How to auto hide another when click one?memberall_i_want_is_everything2 Mar '06 - 3:58 
GeneralDescriptions for only certain itemsmemberShawn M. Reed23 Mar '04 - 4:10 
Generalshow active itemmemberRuuca19 Mar '04 - 8:00 
GeneralRegarding maintaining the statesussFasilak19 Mar '04 - 4:45 
GeneralRe: Regarding maintaining the statesussfasilak23 Mar '04 - 0:29 
QuestionHow to use it with Netscapememberbalpo15 Apr '03 - 17:42 
AnswerRe: How to use it with NetscapesussAnonymous15 Apr '03 - 22:07 
GeneralRe: How to use it with Netscapememberburkazoid200319 Jan '04 - 13:45 
Questionload on default?sussAnonymous19 Feb '03 - 20:12 
AnswerRe: load on default?memberKeertikiran11 May '07 - 1:38 
Generalquestion with framesussxslipwizx2 Feb '03 - 16:55 
GeneralRe: question with framememberEric Garcia11 Nov '03 - 17:21 
GeneralRe: question with framememberjjfatts18 May '06 - 11:12 
GeneralCoolmemberSteve McLenithan19 Nov '02 - 5:17 
GeneralSmall bug expandingmemberObliterator18 Nov '02 - 6:38 
GeneralRe: Small bug expandingmembertommy skaue18 Nov '02 - 23:32 
GeneralRe: Small bug expandingmemberZek3vil19 Nov '02 - 3:47 
GeneralRe: Small bug expandingmembertommy skaue19 Nov '02 - 3:53 
GeneralRe: Small bug expandingmemberMarc Heiligers26 Nov '02 - 0:47 
GeneralRe: Small bug expandingmembertommy skaue26 Nov '02 - 0:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Permalink | Advertise | Privacy | Mobile
Web04 | 2.6.130516.1 | Last Updated 19 Nov 2002
Article Copyright 2002 by Zek3vil
Everything else Copyright © CodeProject, 1999-2013
Terms of Use
Layout: fixed | fluid