Styling Circles with CSS

HTML:

        <ul class="list_header">
            <li><a href="#">06 december 2013</a></li>
            <li><a href="#">item2</a></li>
            <li><a href="#">item3</a></li>
            <li><a href="#">item4</a></li>
            <li><a href="#">item5</a></li>
            <li><a href="#">item6</a></li>
        </ul>

CSS:

.list_header{
    font: italic 70% Georgia;
    margin: 15px 0 0 15px;
}
.list_header li{
    display: inline-block;
}
.list_header a{
    color: #bbb;
    text-decoration: none;
}
.list_header li:first-child :after{
    content: '/t';
    height: 3px;
    border-radius:  50%;
    background: #bbb;
    padding: 0px 0px 0px 5px;
    margin: 0px 0px 0px 5px;
}

http://codepen.io/hristofor/pen/aILlC

What is the best way to decrease the size of the circle in the CSS code above? I attempted to adjust the width and height parameters, but it did not have the desired effect. Any suggestions on how to make the circle smaller?

Answer №1

To start, eliminate any tab characters from the text. Next, set the CSS property display: inline-block, remove padding, and define a specific value for both width and height.

For an interactive demonstration, visit this link: http://codepen.io/user123/pen/Abcde

The issue with your code lies in the fact that the pseudo element is styled as inline, causing its size to be determined by content and other factors like font-size.

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

Is there a way to ensure that my slideshow images maintain their proportions when viewed on various screen sizes?

I came across a code snippet for an image slideshow that I really liked, but it didn't resize properly on different browser sizes. Initially, I attempted to use the vh property to address this issue, but unfortunately, the images wouldn't scale p ...

What is the best way to reduce a varying percentage as the value continues to rise?

My memory of math may be a bit fuzzy, but I can't seem to recall how to solve this particular issue. In jQuery, I have been adding randomized clipping paths to my images using the following code: var max=100; var spread=5; jQuery.each( $("img"), func ...

Adding graphs dynamically to Dygraphs allows for real-time updates and interactive data

I recently started using Dygraphs for one of my projects and I am still learning how to work with it. After reading through the documentation and looking at a few examples, I noticed that the constructor for Dygraphs requires a div element where the graph ...

Having trouble loading external CSS in HTML?

I have been attempting to load an external CSS file into my current HTML file without success. I have provided images showcasing the code: View the code here See the output here Currently, I am working on Windows and using Aptana Studio 3 as my IDE. ...

Steps to turn off fancybox for mobile and show the full image instead

In this scenario... I am seeking a way to deactivate fancybox functionality on mobile devices. I have already discovered one method to disable it... And now I want to directly show the large image in the a href="xxx_large.jpg" instead of using the img src= ...

CSS to Change the Order of Displayed Table Cells

I have created a web page layout using blocks set to display: table-cell. Everything is functioning correctly, but I am struggling to rearrange the cells within a row and I am curious if there is a way to achieve this or maybe an interesting trick that cou ...

Utilize jQuery to serialize the HTML input elements that are dynamically generated outside of the form

A proof of concept is in progress for an application that involves the generation of HTML elements based on user-configured fields. Here is a sample configuration: // Customer SAM $response = array( array ( NAME => CUSTOMER, TYPE = ...

Encountered a parsing error while attempting to include the navigation bar page

<?php echo <<< END <!DOCTYPE html> <!-- --> <html> <head> <title>Nav</title> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0 ...

Issues with flex grow and flex shrink not being effective arise when an adjacent flex element contains lengthy text

How can I ensure that the color swatch fills the designated space in the CSS (width: 40px) while allowing the label to shrink? The issue arises when the label is a long word such as "Corn flower blue", causing the color swatch to shrink instead of maintain ...

Tips to prevent caching in the web console while reviewing the code document

Currently troubleshooting a PHP file with a syntax error using Firefox web console. I ensured the Disable Cache option is set and observed that changes to the file take effect immediately. However, despite displaying the syntax error in the console, clicki ...

jQuery fails to apply a class if the input fields are not empty

I am currently working on a function that displays a login button only when both input fields are not empty. However, for some reason, jQuery seems to be giving me trouble with this task. Despite checking and ensuring that I am using the correct and updat ...

Unable to run JavaScript file fetched from cache API

For a web application built using pure vanilla JavaScript without utilizing service workers, I am looking to cache a JavaScript file hosted on an AWS S3 file server explicitly. The script below will be embedded in the index.html file of the application (UR ...

The data-src tags are functioning properly in the index.html file, but they are not working correctly in angular

I'm still learning about Angular and JavaScript, so please bear with me if my questions seem silly. I've been trying to add a theme to my Angular project. When I include the entire code in index.html, everything works fine. However, when I move ...

Adjusting the zoom feature in CSS3

I'm looking to have my React app display as if the user has changed the zoom level to 90%. I attempted to tackle this issue using CSS. body { transform: scale(0.9); } However, this method did not result in the screen appearing similar to wh ...

Backend data displayed on carousel presents either all images or none at all

I am currently working on a Django project that involves displaying a list of images in a Carousel format within my template. I have encountered an issue with setting the active class for the Carousel items. When I include the "carousel-inner active" clas ...

There are two different ways to set a hyperlink in HTML. One method is by using the href attribute, where you provide the URL inside the quotation marks. The other

While browsing, I stumbled upon this interesting piece of JavaScript code: onClick="self.location.href='http://stackoverflow.com/'" I incorporated this code into my website, and it seems to have the same effect as using the href attribute. Sin ...

Tips for customizing the CSS of a child component that has been imported from a different module in Angular 2

I have been using agm-snazzy-window from amg-snazzy-window There is a mention that I can modify the css class, but when I try to do so, it doesn't seem to work. Here is an example: map-component.html <agm-snazzy-info-window [closeWhenOthersOp ...

Direct jQuery to redirect to a new page and reveal a hidden div

I am facing a situation where I have two web pages named index and results. The results.html page contains some hidden divs with the CSS property set to display: none. My goal is to navigate from the index page using a navigation menu and open the results ...

Using jQuery to change the `class` of the parent `div` based on the length of a `p`

I am attempting to adjust the height of a parent div based on the length of text in its child p.descr. This is achieved by adding a specific class that corresponds to different height values in CSS. Below is the jQuery code snippet: $(document).ready(fu ...

What could be causing the div to be wider than the content inside of it?

I am having an issue creating a webpage with a 20-60-20 flex fill layout. The div in the center, which should occupy 60% of the page, is wider than its content, causing it to appear off-center. https://i.stack.imgur.com/WwCJy.png Here is my home.componen ...