JSFiddle - React, Tailwind, and code Playground
HTML
<div class="dropdown">
<div class="dropdown1">
<button class="dropbtn">Climate Change<div class="arrow1">➲</div></button>
<div class="dropdown-content">
<a href="https://thepotatoshop.com/shop/mash/highland-burgundy-red-1kg/">Greenhouse Gases</a>
<a href="https://thepotatoshop.com/shop/mash/arran-victory-1kg/">Carbon Dioxide</a>
<a href="https://thepotatoshop.com/shop/mash/desiree-1kg/">Methane</a>
<a href="https://thepotatoshop.com/shop/salad/belle-de-fontenay-1kg/">Water Vapour</a>
<a href="https://thepotatoshop.com/shop/salad/belle-de-fontenay-1kg/">NF3</a>
</div>
</div>
</div>
CSS
.dropbtn {
background-color: #4CAF50;
transition: 0.3s;
color: white;
padding: 16px;
padding-right: 32px;
font-size: 16px;
border: none;
cursor: crosshair;
border-radius: 2px;
}
/* Dropdown Content (Hidden by Default) */
.dropdown-content {
position: absolute;
background-color: #f9f9f9;
min-width: 160px;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
transition: all 1s ease-in;
overflow:hidden;
height:0;
}
/* Links inside the dropdown */
.dropdown-content a {
color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
}
/* Change color of dropdown links on hover */
.dropdown-content a:hover {
background-color: #f1f1f1;
color: #000000;
}
/* Show the dropdown menu on hover */
.dropdown:hover .dropdown-content {
height:200px;
}
/* Change the background color of the dropdown button when the dropdown content is shown */
.dropdown:hover .dropbtn {
background-color: #3e8e41;
color: #000000;
transition: 0.3s;
}
.dropdown1 {
position: fixed;
top: 150px;
left: 50px;
}
.dropdown2 {
position: fixed;
top: 150px;
left: 220px;
}
.dropdown3 {
position: fixed;
top: 150px;
left: 615px;
}
.dropdown4 {
position: fixed;
top: 150px;
left: 1003px;
}
.pageheading {
font-family: verdana;
font-size: 85% ;
position: absolute;
left: 50px;
top: 210px;
background-color: #4CAF50;
border-radius: 6px;
}
.pageparagraph {
font-family: verdana;
text-align: justify;
position: absolute;
left: 50px;
top: 290px;
right: 685px;
background-color: #4CAF50;
border-radius: 6px;
}
.logo {
font-family: verdana;
font-size: 150%;
color: white;
position: fixed;
top: 10px;
left: 50px;
background-color: #4CAF50;
border-radius: 6px;
}
body {
background-image: url("ForestBackground.jpg");
background-repeat: no-repeat;
}
.arrow1 {
...