Learn CSS pagination in 8 minutes! 🕮

preview_player
Показать описание
#CSS #tutorial #course

CSS HTML pagination tutorial example explained
Рекомендации по теме
Комментарии
Автор

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Bro Code</title>
<link rel="stylesheet" href="style.css">
</head>
<body>

<h1>This is page #1</h1>

<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Ut, iste eaque. Quia accusantium ab dolore labore nobis laudantium quis nisi fuga omnis minima vitae natus amet qui, corporis expedita doloremque.</p>

<div class="pagination">
<a href="index.html"><</a>
<a href="index.html" class="active">1</a>
<a href="page2.html">2</a>
<a href="page3.html">3</a>
<a href="page4.html">4</a>
<a href="page5.html">5</a>
<a href="page2.html">></a>
</div>

</body>
</html>

/* style.css */

.pagination{
text-align: center;
}
.pagination a{
color: black;
text-decoration: none;
padding: 8px 15px;
display: inline-block;
}
.pagination a.active{
background-color: hsl(120, 100%, 70%);
font-weight: bold;
border-radius: 5px;
}
.pagination a:hover:not(.active){
background-color: hsl(0, 0%, 77%);
border-radius: 5px;
}

BroCodez
Автор

U rock. Pls never become one of those losers who uploads shorts entitled “3 things webdevs should STOP doing”

zangl
Автор

What if i got more pages, like hundred or so. What should i do?

leduy
Автор

How can I limit how many page numbers I want shown in the pagination? I have over 600 pages

animecrazyluv
Автор

I thought to use hyper links but you know😅😅😅

joshisaisupreet