Sunday, 16 August 2015

How to Create Drop Down in Pure CSS 

HTML Code is Here

CSS Code is Here

.ul1{
 list-style-type: none;
 margin:5% 0px 15% 20%;
 position: absolute;
 width: 50%;
padding-left:20px;
 height: auto;
 background-color: #F36489;
box-shadow:0px 5px 0px #C75774;
border-radius:5px;
}
 .ul1 li
{
display: block;
float: left;
background-color:transparent;
color: white;
padding: 14px;
 font-size: 20px;
font-family: verdana;
text-transform: capitalize;
letter-spacing: 1px
}
 .ul1 li:hover
{
box-shadow:0px 5px 0px #229E9A ;
background-color: #2DCCC6;
color: white;
letter-spacing: 0.1px;
 transition: .9s all ease-in-out;
}
 .ul1 li div
{
display: none
}
 .ul1 li:hover .div1
{
display: block;
position: absolute;
margin:0px
}
 .div1
{
background-color: red;
width: auto;
top: 110%;
left:17%;
height: 450px;
position: relative;
 display: inline-block;
float: none
}
 .div1 li
{
display: inline-block
}
 .ul2
{
background-color: #C75774;l
ist-style-type: none;
 width: 190px;
height: auto;
position: absolute;
padding:0px;
border-radius:0px 0px 5px 5px;
 display: block
}
 .ul2 li
{
display: block;
float: none;
font-size: 12px;
border: 5px solid transparent;
 color: salmon;
background-color:rgb(243, 100, 137);
margin-bottom: 2px;
position:relative;
}
 .ul2 li a
{
padding-left:20px;
font: 14px;
color: white;
 padding: 0px;
text-decoration: none;
 font-family: verdana;
 text-transform: capitalize;
font-weight: 600;
 letter-spacing: 1px;
}
.ul2 li a:hover
{
text-decoration: underline;
}

No comments:

Post a Comment