Pargination with Margins
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="STYLESHEET" type="text/css" href="web.css">
<title>web design</title>
</head>
<body>
<h1>Pagination with Margins</h1>
<div class="pagination">
<a href="#">«</a>
<a href="#">1</a>
<a href="#" class="active">2</a>
<a href="#">3</a>
<a href="#">4</a>
<a href="#">5</a>
<a href="#">6</a>
<a href="#">7</a>
<a href="#">»</a>
</div>
</body>
</html>
CSS Pargination with Margins Style
.pagination{
display: inline-block;
}
.pagination a{
color: #000;
float: left;
padding:8px 16px;
text-decoration: none;
transition: background-color 3s;
border: 1px solid #ddd;
margin:0px 4px ;
}
.active{
background-color: green;
color: #fff;
border: 1px solid green;
}
.pagination a:hover:not(.active){
background-color: #ddd;
color: #fff;
}
No comments:
Post a Comment