- Subscribe to RSS Feed
- Mark Thread as New
- Mark Thread as Read
- Float this Thread for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
Embed Not Working to Make a Drop Down List
Hello there! I am trying to embed a Drop Down List into my site. It is a drop down table of contents. I used random links for testing, however, when I go on the site and hover over the "Table of Contents", it does not drop down. Same with if I click it. It SHOULD work if I hover over since that is how I have written the code. Below I have added the HTML, so you can see how the drop down menu is supposed to work. My site is https://novelscape.weebly.com/chapter-1.html
<!DOCTYPE html>
<html>
<head>
<style>
.dropbtn {
background-color: black;
color: white;
padding: 16px;
font-size: 16px;
border: none;
min-width: 300px;
margin: 0 auto;
}
.dropdown {
position: relative;
display: inline-block;
}
.dropdown-content {
display: none;
position: absolute;
background-color: #f1f1f1;
min-width: 300px;
overflow: auto;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
z-index: 1;
}
.dropdown-content a {
color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
}
.dropdown-content a:hover {background-color: #ddd;}
.dropdown:hover .dropdown-content {display: block;}
.dropdown:hover .dropbtn {background-color: grey;}
</style>
</head>
<div class="dropdown">
<button class="dropbtn">Table of Contents</button>
<div class="dropdown-content">
<a href="https://www.google.com">Chapter 1</a>
<a href="https://www.facebook.com">Chapter 2</a>
<a href="https://www.youtube.com">Chapter 3</a>
<a href="https://www.youtube.com">Chapter 3</a>
<a href="https://www.youtube.com">Chapter 3</a>
<a href="https://www.youtube.com">Chapter 3</a>
</div>
</div>
</body>
</html>
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report
- Subscribe to RSS Feed
- Mark Thread as New
- Mark Thread as Read
- Float this Thread for Current User
- Bookmark
- Subscribe
- Printer Friendly Page