Post by Joker on Jul 23, 2016 11:21:13 GMT
This code string is rather extensive, but very satisfying to master. The principle is thus:
<!DOCTYPE html>
<html>
<head>
<style>
.dropbtn {
background-color: #9c19e6;
color: white;
padding: 16px;
font-size: 16px;
border: none;
cursor: pointer;
}
.dropdown {
position: relative;
display: inline-block;
}
.dropdown-content {
display: none;
position: absolute;
background-color: #e64ee6;
min-width: 160px;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
}
.dropdown-content a {
color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
}
.dropdown-content a:hover {background-color: #8f70dd}
.dropdown:hover .dropdown-content {
display: block;
}
.dropdown:hover .dropbtn {
background-color: #be69ee;
}
</style>
</head>
<body>
<center><div class="dropdown">
<button class="dropbtn">Name</button>
<div class="dropdown-content">
<a href="insert button 1 target URL here"target= "_blank">insert button 1 text here</a>
<a href="insert button 2 target URL here"target= "_blank">insert button 2 text here</a>
<a href="insert button 3 target URL here"target= "_blank">insert button 3 text here</a>
</div><center>
</div>
</body>
</html>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
Replace the hex codes with colours of your choice, select a name for your menu and choose target URLs with corresponding button texts where I have marked with red colour (all the break commands are necessary to view the buttons). Then, open a new HTML widget on your custom page, paste the modified code string and check the result.
<!DOCTYPE html>
<html>
<head>
<style>
.dropbtn {
background-color: #9c19e6;
color: white;
padding: 16px;
font-size: 16px;
border: none;
cursor: pointer;
}
.dropdown {
position: relative;
display: inline-block;
}
.dropdown-content {
display: none;
position: absolute;
background-color: #e64ee6;
min-width: 160px;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
}
.dropdown-content a {
color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
}
.dropdown-content a:hover {background-color: #8f70dd}
.dropdown:hover .dropdown-content {
display: block;
}
.dropdown:hover .dropbtn {
background-color: #be69ee;
}
</style>
</head>
<body>
<center><div class="dropdown">
<button class="dropbtn">Name</button>
<div class="dropdown-content">
<a href="insert button 1 target URL here"target= "_blank">insert button 1 text here</a>
<a href="insert button 2 target URL here"target= "_blank">insert button 2 text here</a>
<a href="insert button 3 target URL here"target= "_blank">insert button 3 text here</a>
</div><center>
</div>
</body>
</html>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
Replace the hex codes with colours of your choice, select a name for your menu and choose target URLs with corresponding button texts where I have marked with red colour (all the break commands are necessary to view the buttons). Then, open a new HTML widget on your custom page, paste the modified code string and check the result.