
- CSS Tutorial
- CSS - Home
- CSS - Introduction
- CSS - Syntax
- CSS - Inclusion
- CSS - Measurement Units
- CSS - Colors
- CSS - Backgrounds
- CSS - Fonts
- CSS - Text
- CSS - Images
- CSS - Links
- CSS - Tables
- CSS - Borders
- CSS - Margins
- CSS - Lists
- CSS - Padding
- CSS - Cursors
- CSS - Outlines
- CSS - Dimension
- CSS - Scrollbars
- CSS Advanced
- CSS - Visibility
- CSS - Positioning
- CSS - Layers
- CSS - Pseudo Classes
- CSS - Pseudo Elements
- CSS - @ Rules
- CSS - Text Effects
- CSS - Media Types
- CSS - Paged Media
- CSS - Aural Media
- CSS - Printing
- CSS - Layouts
- CSS - Validations
- CSS3 Tutorial
- CSS3 - Tutorial
- CSS3 - Rounded Corner
- CSS3 - Border Images
- CSS3 - Multi Background
- CSS3 - Color
- CSS3 - Gradients
- CSS3 - Shadow
- CSS3 - Text
- CSS3 - Web font
- CSS3 - 2d transform
- CSS3 - 3d transform
- CSS3 - Animation
- CSS3 - Multi columns
- CSS3 - User Interface
- CSS3 - Box Sizing
- CSS Responsive
- CSS - Responsive Web Design
- CSS References
- CSS - Questions and Answers
- CSS - Quick Guide
- CSS - References
- CSS - Color References
- CSS - Web browser References
- CSS - Web safe fonts
- CSS - Units
- CSS - Animation
- CSS Resources
- CSS - Useful Resources
- CSS - Discussion
Center pagination on a web page with CSS
You can try to run the following code to center pagination on a web page:
Example
<!DOCTYPE html> <html> <head> <style> .demo { display: inline-block; } .demo1 { text-align: center; } .demo a { color: red; padding: 5px 12px; text-decoration: none; transition: background-color 2s; border: 1px solid orange; font-size: 18px; } .demo a.active { background-color: orange; color: white; border-radius: 5px; } .demo a:hover:not(.active) { background-color: yellow; } .demo a:first-child { border-top-left-radius: 10px; border-bottom-left-radius: 10px; } .demo a:last-child { border-top-right-radius: 10px; border-bottom-right-radius: 10px; } </style> </head> <body> <h2>Our Quizzes</h2> <div class = "demo1"> <div class = "demo"> <a href = "prev.html"><</a> <a href = "quiz1.html">Quiz1</a> <a href = "quiz2.html">Quiz2</a> <a href = "quiz3.html" class = "active">Quiz3</a> <a href = "quiz4.html">Quiz4</a> <a href = "next.html">></a> </div> </div> </body> </html>
- Related Articles
- Retrofit existing web page with mobile CSS
- Create a transition effect on hover pagination with CSS
- Controlling Pagination with CSS
- Create a responsive pagination with CSS
- Creating ‘Copy to Clipboard’ feature on a web page with JavaScript
- Add hoverable pagination with CSS
- How to create a pagination with CSS?
- Save a Web Page with Python Selenium
- Hide a video tag on a web page - JavaScript
- Set style for pagination with CSS
- Remove any text not inside element tag on a web page with JavaScript?
- Add space between pagination links with CSS
- Implementing the page factory in pagination
- Center image using text-align center with CSS?
- Adding YouTube videos on an HTML web page

Advertisements