How to create a list group with css

How to create a list group with css and html

We will create a responsive and very simple list group
with css and html. We will design a beautiful header with 
hoverable lists.

Here is the list group

Here is the source code

<!DOCTYPE html>
<html>
<head>
<title></title>
<style type="text/css">

.group-list
{
width:100%;
height :auto;
padding :0;
margin :0;
border-top:1px solid #ddd ;
border-left:1px solid #ddd ;
border-right :1px solid #ddd;
border-radius :2px;
box-shadow:0 0 2px 2px rgba(0,0,0,0.1);
}
.group-list:first-child a
{
border-top-left-radius:2px;
border-top-right-radius:2px;
}
.group-list:last-child a
{
border-bottom-left-radius:2px;
border-bottom-right-radius:2px;
}
.group-list .header
{
background :#d32f2f ;
color:#fff;
}
.group-list .header:hover
{
background :#d32f2f ;
}
.group-list li
{
list-style-type :none;
display :block ;
width:100%;
height :30px;
line-height :30px;
border-bottom :1px solid #ddd ;
}
.group-list li a
{
padding-left :2px;
text-decoration :none;
color:#222;
font-family :Arial,sans-serif;
display :block ;
font-size :18px;
transition :1s;
font-weight :270;
}
.group-list li a:hover
{
background :#222;
color:#fff;

}
</style>
</head>
<body>

<ul class="group-list">
<li><a href="#" class="header">JavaScript Basic </a></li>
<li><a href="#" >Print Value</a></li>
<li><a href="#" >Variables</a></li>
<li><a href="#" >Arrays</a></li>
<li><a href="#" >Operators</a></li>
<li><a href="#" >Comments</a>
<li><a href="#" >Conditional Statements </a></li>
<li><a href="#" >Loop Statements</a></li>
<li><a href="#" >Functions </a></li>




</body>
</html>

Comments

Post a Comment

Popular posts from this blog

Getting Started with JavaScript

JavaScript fundamentals