What is the best way to eliminate the space between the disc and the li item?

Despite setting the li element's padding to 0, there seems to be a residual 10 pixels of padding. How can I reduce the padding amount further?

Answer №1

Trying to avoid being mundane :) However, negative declaration text-intend:-5px; seems like a misguided workaround to me. While it does affect the browser's default styles, it simply shifts the text outside of its parent element, creating an awkward hanging indent. I've searched for any inherited browser styles that could be causing padding around bullets or discs, but I haven't found any.

Upon further research, I discovered CSS3 includes a special pseudo-element ::marker designed to tackle this issue. Although the concept is promising, it has yet to be implemented in any browser :(

Interestingly, Mozilla offers its own temporary solution for styling bullets with :-moz-list-bullet - https://developer.mozilla.org/en-US/docs/CSS/:-moz-list-bullet. No other vendors seem to support or have adopted such a workaround.

CSS3 introduces a new value for list-style-position: hanging, which may provide some assistance. However, its implementation remains unclear.

Another approach is utilizing the pseudo-element ::before (not supported in IE7)

li:before { 
 content:"•";  
 margin-right:1px;
}

Ultimately, it appears that there isn't much interest or urgency to address this issue. Most people are content with using text-intend.
Honestly, why would anyone want to eliminate that space between the bullet and the text :)) Perhaps it's just one of those unintentional quirks in implementation.

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

Tips on modifying the maxlength attributes for all "field answer" class elements

Looking for some help with adjusting the "maxlength" attribute in a class called "field answer." The current maxlength is set to 250, but I need it changed to 9999. Can someone guide me through this process? <div class="field answer"> &l ...

What is the method to create a resizable table column border rather than resizing the bottom corner border?

At the moment, we are able to resize the table border when we drag the corner. However, my goal is to enable resizing on the right side of the full border. https://i.sstatic.net/yFI24.png Below is the CSS code for resizing: th{ resize: horizontal; ove ...

Scrolling within ion-content is fluid when using a fixed div in Ionic

Following the recent GoogleChrome update, a div set to 'fixed' is now scrolling with the rest of the page. For a demonstration, you can visit the following link: LINK Specifically, the issue occurs with a 'fixed' div placed inside the ...

PHP: The issue with displaying array values in an HTML select within a form using a foreach loop

I am currently working with an array containing a list of countries. $country_list = array( "Afghanistan", "Albania", "Algeria", "Andorra", "Angola" }; I want to display these countries using a select element in my form <select ...

Direct your attention towards the bootstrap dropdown feature

I have encountered an issue with using a bootstrap dropdown. I need to focus on the dropdown in order to navigate through its options using the keyboard. However, my current attempt at achieving this using jQuery does not seem to be working when I use $(&a ...

When the Add button in AngularJS is clicked, a new popup page should appear by concealing the parent page

I am currently working on a project that involves using the AngularJS/Breeze framework within the HotTowel Template. One of the requirements I have is to include a button/link labeled "Add" on the parent.html page. When this button is clicked, it should t ...

Merge multiple echoes to create a single echoed string that is valid HTML

<?php // link to Google Docs spreadsheet $url='https://docs.google.com/spreadsheets/d/1_4d-MPxTUOVZbxTOlhjXv1ebTlBPQ-_JrYUlS1rqX5Q/pub?output=csv'; // open file for reading if (($handle = fopen($url, "r")) !== FALSE) { while (($data = fge ...

How to Customize the Navbar Position in Bootstrap 3 when the Brand/Logo is Collapsed

I am currently in the process of creating my first website and experimenting with the Bootstrap 3 framework. The navbar I have selected is designed to adjust based on screen size, collapsing into a small button for use on tablets and mobile devices. Howe ...

The Simple HTML Dom parser is failing to parse contents on these specific websites

I tried using a basic HTML DOM parser but it's encountering issues when parsing certain websites. include_once 'simple_html_dom.php'; $html=file_get_html('http://www.lapenderiedechloe.com/'); This results in an error message like ...

Online platform showcasing erroneous information about Bootstrap Screen Readers

I'm currently developing a new website by utilizing some code I previously wrote for an older site. However, the incorporation of slightly more advanced PHP includes seems to have resulted in different behavior on the two sites. Both sites feature a ...

Adaptable Navigation

I am currently working on creating a responsive navigation menu inspired by Bootstrap's design. However, I have encountered some challenges in implementing it. The current issue I am facing is that the navigation disappears when transitioning from a s ...

Is it possible to access the serial port using HTML5?

Can a HTML5 page access the serial port of a device solely on the client-side? I am aware that this is possible with Java applet, but I am curious to know if it can be achieved using HTML5. ...

The .remove() method is ineffective when used within an Ajax success function

I am facing an issue with removing HTML divs generated using jinja2 as shown below: {% for student in students %} <div class="item" id="{{ student.id }}_div"> <div class="right floated content"> <div class="negative ui button compa ...

Implementing the rotation of an element using 'Transform: rotate' upon loading a webpage with the help of Jquery, Javascript, and

A div element designed to showcase a speedometer; <div class="outer"> <div class="needle" ></div> </div> The speedometer animates smoothly on hover; .outer:hover .needle { transform: rotate(313deg); transform-origin: ce ...

Issues with pop-up windows on YII2 gridview

I am currently developing a web application using the Yii2 framework for my company to efficiently manage their storage. I have incorporated various plugins from kartik-v to enhance the functionality of the application. However, I am facing an issue with i ...

Change the destination of an iFrame upon user click

Is it possible to redirect an iFrame to a different HTML page when clicked by the user? I have an iFrame that is essentially an HTML page. When I click on the iFrame, I want it to take me to another HTML page. This is my code: h1 { ...

Utilizing the Calc() method within CSS specifically for adjusting the padding on the left and top sides

I am currently working on a website using HTML and SASS. My design includes a fixed header and aside sections. header{ width: 100%; box-shadow: 0 0 4px rgba(0,0,0,.25); position: fixed; z-index: 5; top: 0; ...

What is causing all three boxes to shift when I'm attempting to move just one of them?

Seeking assistance with a problem I'm encountering. As I work on creating my website, I've run into an issue where trying to move one of the three individual boxes (as shown in the image) causes all three of them to shift together. You can view t ...

Guide to adding an HTML node both before and after another node in R

Can someone help me with the following problem? require(xml2) sup_before <- read_xml("<sup>R$</sup>") sup_after <- read_xml("<sup>,00</sup>") node <- read_xml('<tr> <td style="text-align:center;" class= ...

Break down and simplify the code into individual components

<input type='button' class="myButton" onclick="document.body.style.cssText+=';background-image: url(img01.jpg);background-repeat: no-repeat; -moz-background-size: cover; -o-background-size: cover; background-size: cover;';" value="S ...