Switching out the default squares in pagination for circles

Attempting to incorporate pagination using the bootstrap class

.circle {
  position: absolute;
  left: 0;
  width: 20px;
  height: 20px;  
  border: 2px solid #777;
  border-radius: 100%;
}

.pagination>li>a, .pagination>li>span {
  border-radius: 100% !important;
  border: 0px !important;
}

.active {
  background: #777;
}
<script src="//code.jquery.com/jquery-1.11.1.min.js"></script>
<link href="//netdna.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<script src="//netdna.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
<!------ Include the above in your HEAD tag ---------->

<div class="container">
<ul class="pagination">
              <li><a href="#">«</a></li>             
              <li><a data-toggle="tab" href="#tab1"><span class="circle"></span></a></li>
              <li><a data-toggle="tab" href="#tab1"><span class="circle"></span></a></li>
              <li><a data-toggle="tab" href="#tab1"><span class="circle"></span></a></li>
              <li><a data-toggle="tab" href="#tab1"><span class="circle"></span></a></li>
              <li><a data-toggle="tab" href="#tab1"><span class="circle"></span></a></li>
              <li><a href="#">»</a></li>
 </ul>
</div>

Removing the default squares and inserting circles instead has proven challenging. Despite attempting to give border-radius to the squares, they remain oval in shape, rather than achieving a circular appearance.

Answer №1

Is this the answer you seek?

ul.pagination li a {
  width: 10px;
  height: 10px;
  padding: 0;
  top: 10px;
  border-radius: 50%;
}

ul.pagination li:first-child a {
  border-top-left-radius: 50%;
  border-bottom-left-radius: 50%;
  line-height: 5px;
}

ul.pagination li:last-child a {
  border-top-right-radius: 50%;
  border-bottom-right-radius: 50%;
  line-height: 5px;
}
<script src="//code.jquery.com/jquery-1.11.1.min.js"></script>
<link href="//netdna.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<script src="//netdna.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
<!------ Include the above in your HEAD tag ---------->

<div class="container">
  <ul class="pagination">
    <li><a href="#">«</a></li>
    <li><a data-toggle="tab" href="#tab1"><span class="circle"></span></a></li>
    <li><a data-toggle="tab" href="#tab1"><span class="circle"></span></a></li>
    <li><a data-toggle="tab" href="#tab1"><span class="circle"></span></a></li>
    <li><a data-toggle="tab" href="#tab1"><span class="circle"></span></a></li>
    <li><a data-toggle="tab" href="#tab1"><span class="circle"></span></a></li>
    <li><a href="#">»</a></li>
  </ul>
</div>

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Chart displaying an errant scrollbar at the bottom of the screen

Having trouble with a table that displays a scrollbar when a specific row is added. The first and second rows in the code below display correctly. However, adding the third row within the foreach loop causes a scrollbar to appear at the bottom. This issu ...

Ajax continues to operate even if an error is detected

Hello fellow programmers! I'm currently facing an issue with form submission and validation using jQuery with 2 ajax events. The problem lies in the fact that even if the first ajax event (timeconflict.php) returns an error, the second ajax event (res ...

Managing the ajax response to showcase a button within datatables

Here is my current datatable structure: <table id="list" class="display" width="100%" > <thead> <tr> <th>Title</th> <th>Description</th> <th>delete</th> ...

Creating a personalized grid display

https://i.sstatic.net/tLd7X.png I've been trying to achieve the following output with my code, but so far nothing has worked. Can someone help me identify what I may be doing wrong? I'm new to this, so any guidance would be greatly appreciated. ( ...

Utilizing JavaScript values instead of relying on HTML values - a step-by-step guide

I am facing a challenge with 3 buttons that I have created: <button id="b1">0</button> <button id="b2">0</button> <button id="b3">0</button> Instead of retrieving the value from the HT ...

How to enable drag-and-drop functionality for an iframe?

I've successfully made a chat widget draggable using react-draggable. However, the chat widget is also consumed by an iframe created entirely with HTML. I need the iframe to be draggable as well, but react-draggable doesn't support this. Are ther ...

Validating a form using HTML5 in a modal designed with Bootstrap

As a newcomer to jquery and javascript, I am facing a challenge. I want the form to open when the "Open Modal" button in the modal is clicked. After that, upon clicking 'Save' in the modal, I need it to validate the HTML5 form and if validation ...

I am having difficulty retrieving all the cssRules for certain pages

Attempting to retrieve all CSS rules using JavaScript has yielded varying results. For instance, on StackOverflow, the code used is: console.log( document.styleSheets[1].href,'rules', document.styleSheets[1].cssRules,'Should be css rules, ...

What materials are required in order to receive messages and information through my Contact page?

Currently, I am pondering the optimal method for gathering information from my Contact page. I have already created a form; however, I'm unsure how to send the gathered data to myself since I am relatively new to Web development. Angular is the framew ...

How can I convert an HTML Div to CSS styling?

Currently, I am attempting to transform the following HTML code snippet into CSS. While I understand that you can utilize div in CSS, I am uncertain if it is possible to use an href with CSS. Here is the code in question: <div id="menubar1"> <a ...

Get the Label Values Based on CheckBox Status

Is there a way to retrieve the values of labels corresponding to checkboxes in HTML? I have multiple labels and checkboxes next to each other, and I want to be able to get the label values if the checkbox is checked. Can you provide guidance on how to do ...

CSS - Guidelines for Targeting Multiple Elements

My CSS code includes several commands that target similar elements, but the resulting design appears messy. I am seeking advice on a more effective way to select these elements in a conventional manner. Despite consulting documentation, I have resorted to ...

How to integrate a chips feature in Angular 4 using Typescript

Struggling to incorporate a chips component into my Angular web application, which comprises Typescript, HTML, and CSS files. After grappling with this for weeks without success, I have yet to find the right solution. To review my current code, you can a ...

Tips on how to dynamically update information with Angular

Looking to dynamically update data when a user selects an option from a dropdown menu using the Angular framework This is what I currently have: <div> <button type="button"> {{tests[0].test}} </button> <ul c ...

Padding-left in InfoBox

Currently, I am in the process of developing a map using Google Maps API3 along with the InfoBox extension available at this link I have successfully implemented an overall padding to the Infobox using the following code snippet: var infoOptions = { disa ...

Troubleshooting my HTML5 local storage issues for optimal functionality

I've been working on using HTML5's localstorage to save two variables and load them upon page refresh, but I seem to be encountering some issues when trying to load the saved items: Variables in question: var cookies = 0; var cursors = 0; Savi ...

Is it possible to deactivate an anchor tag based on the result of a conditional statement that returns a string?

I've created an anchor tag (not a button) with text that redirects me to another page <StyledTableCell align="center"> <Link href={`/races/results/${race.id}`}>{race.race_name}</Link> </StyledTableCell> There is a ...

Incorporate text onto an image using Semantic UI

Currently, I am utilizing Semantic UI to display images. While it is functioning well for me in terms of adding text near the image, I desire to have the text positioned on top of the image. Ideally, I would like it to be located on the lower half of the i ...

How can you trigger an event when a table cell is selected and a key is pressed?

In my project, I have some td elements with a class name assigned to them. My goal is to trigger a pop-up window when one of these td elements is in focus and the F9 key is pressed. Here's what I've attempted so far: $(document.body).keypress(fu ...

When I access the browser, it displays "???"" symbols instead of UTF-8 characters

When I view the website in my browser, it displays "???" instead of UTF-8 characters. How can I identify the cause and rectify this issue? Below is the content of the HTML file: <HTML> <title>Search Engine</title> <form ac ...