JSFiddle - React, Tailwind, and code Playground

by younesalouani

HTML

<div class="myaccount-dropdown">
          
          <button onclick="myFunction()" class="myaccount-dropbtn">My Account</button>
         
          <div id="myaccount-myDropdown" class="myaccount-dropdown-content">
            
            <a href="#">My Projects</a>
            <a href="#">My Bids</a>
            <a href="#">My Profile</a>
            
          </div>
   </div>

CSS

body {
  font-family: arial;
}

.container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}


@media (min-width: 768px) {
  .container {
    display: grid;
    grid-template-columns: 300px 1fr 300px;
    /* adapt values to content */
    /* search box padding should be modified in case */
    grid-template-rows: 52px auto 60px;
  }
}

header {
  grid-column: span 3;
  font-size: 1em;
  background-color: #015249;
  color: white;
  padding: 0px;
  margin: 0px;

}

main {
  grid-column: span 1;
  flex: 1;
  padding: 20px;
  margin: 0px;
  background-color: #abddc7;
}

main p {
  background-color: white;
  font-size: 20px;
  font-family: Helvetica;
  border: 1px solid #efefef;
  padding: 10px;
}

nav {
  grid-column: span 1;
  background-color: #abddc7;
  padding: 20px;
  margin: 0px;
}

aside {
  grid-column: span 1;
  padding: 20px;
  margin: 0px;
  background-color: #abddc7;
}

footer {
  grid-column: span 3;
  padding: 30px;
  text-align: center;
  font-size: 1.4em;
  background-color: #015249;
  color: white;
}




/* -Nav Bar styling */
/* -----------------------------*/

.logoText1 {
  color : white;
  font-weight: bold;
  font-family : helvetica;
  font-size : 1.5em;
}
.logoText2 {
color :   white;
font-weight: bold;
font-size : 1em;
}

header .navContainer {
  padding: 0px;
  margin: 0px;
  background-color: #015249;
  display: flex;
  flex-direction: column;
  height: 100%;
  align-items: center;
}

header ul {
  background-color: #6D071A;
  display: flex;
  flex-direction: column;
}

header .navContainer .children {
  list-style-type : none;
  font-size: 1em;
  font-weight: bold;
}

header .navContainer .children a {
  padding:.8rem 1rem;
  display: block;
  text-decoration: none;
  color: rgb(211,211,211);
  -webkit-transition: color 0.5s; /* For Safari 3.0 to 6.0 */
  transition: color 0.5s; /* For modern browsers */
}



header .navContainer .addProject:hover a{
  color: white;
}

/* CSS for less than 480px */

@media only screen and...

JavaScript

function CreateFunction() {
    document.getElementById("create-myDropdown").classList.toggle("show");
}

function myFunction() {
    document.getElementById("myaccount-myDropdown").classList.toggle("show");
}

function ExploreFunction() {
    document.getElementById("explore-myDropdown").classList.toggle("show");
}