Spacing Not Working for Ordered List
See original GitHub issueI’m trying the spacing utility for this ordered list. I will use all -n3
for this test case. It works for every other resolution except for the ml-sm-n3
class. It only works for sm
resolution if I use ml-n3
instead of ml-sm-n3
class.
Here’s the code;
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" />
</head>
<body>
<p>Spacing utility</p>
<div>  ↓</div>
<ol class="ml-sm-n3 ml-md-n3 ml-lg-n3 ml-xl-n3">
<li>Item</li>
<li>Item 2</li>
</ol>
</body>
</html>
Preview;
I’m using; Bootstrap: Version 4.4.1 Operating system: Microsoft Windows 10 Version 2004 (OS Build 19041.508) (64-bit) Browser: Microsoft Edge Version 85.0.564.51 (64-bit)
What am I doing wrong here?
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
How do I set vertical space between list items? - Stack Overflow
All CSS needs to be inline. In the case where you want to adjust the spacing between the bullets I use li style="margin-bottom:8px;"...
Read more >Styling lists - Learn web development | MDN
The list items ( <li> elements) have no set defaults for spacing. The <dl> element has a top and bottom margin of 16px...
Read more >Best Practices for List Spacing (both UL & OL) - SitePoint
Mostly concerned with spacing between list items, but also with left-indent issues across all browsers. These are NOT menus.
Read more >How to change spacing between items in a list in Word
Add spacing between list items · Open Microsoft Word · Select the Layout tab from the Ribbon · From the Paragraph dialog box,...
Read more >Topic: How to add space between items in ordered list
So there's space between the bulleted items up on wordpress but then no spacing when it's fed onto my site through rss.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
That’s by design. See the above comments for more information on this as well. Beyond that, you’re using negative margin to override the default
padding-left
on<ol>
s when you could change the padding instead..ml-n3
would work.There’s no need for all of the other breakpoints since each class applies to all breakpoints above:
Is the same as: