/    Sign up×
Community /Pin to ProfileBookmark

How to create a windows start menu-like button?

Hi guys

I’m trying to create a menu that once it’s clicked, other sub menus would pop out (something similar to Windows Start menu).

I probably need Java Script to accomplish this.
I have zero knowledge of JS, but I’m willing to learn.
Your help is greatly appreciated!

Here is my code:

HTML:

[CODE]
<html>
<head>

<link rel=”stylesheet” type=”text/css” href=”menu.css”>
</head>
<body>

<div id=”menu”>
<ul>
<li><a href=””><p>Start</p></a>
<div class=”submenu”>
<ul>
<li><a href=””><p>Images </p></a></li>
<li><a href=””><p>Videos</p></a></li>
<li><a href=””><p>Documents</p></a></li>
<li><a href=””><p>Settings</p></a></li>
<li><a href=””><p>Log off</p></a></li>
</ul>
</li>
<li><a href=””><p>menu 2</p></a></li>
<li><a href=””><p>menu 3</p></a></li>
<li><a href=””><p>menu 4</p></a></li>
<li><a href=””><p>menu 5</p></a></li>
</ul>
</div>
</div>

</body>
</html>[/CODE]

CSS:

[CODE]body{background-color:grey;}

#menu li{width:200px; float:left; list-style-type:none;}
#menu a{ border-radius:15px; display:block; color:white;
text-indent:55px; border:1px solid white; background-color:black;
font-size:18pt; font-weight:bold; text-decoration:none;}
#menu a:hover{color:black; background: white;}

#menu ul .submenu li{height:75px; float:left; width:250px;}
#menu li .submenu{position:absolute; left:20px;
width:10px; height:200px; display:none;}

#menu li:hover .submenu{display:block;}[/CODE]

to post a comment
Full-stack Developer

0Be the first to comment 😎

×

Success!

Help @Nick-S spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...