Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bootstrap UL with bullets

I need a ul with bullets with bootstrap loaded on the page. I cannot find a single example of how to do this with bootstrap on the page (google only results in examples to REMOVE bullets, not show bullets). Is there a class I should be adding that is undocumented?

I have tried adding

ul {
    list-style-type: disc !important;
}

does absolutely nothing: https://jsfiddle.net/49kwo5pL/2/

The documentation (http://getbootstrap.com/css/#unordered) says you have to add a class to remove the bullets, but that doesn't see to be the actual case.

like image 852
Omnilord Avatar asked Oct 27 '15 20:10

Omnilord


People also ask

How do I add bullets to UL in HTML?

First, place the <ul>… </ul> tags around the text to turn into a bulleted list. Second, place the <li>… </li> tags around each line item in the list.

How do you inline items of a list with bootstrap?

Placing Ordered and Unordered List Items Inline. If you want to create a horizontal menu using the ordered or unordered list you need to place all list items in a single line (i.e. side by side). You can do this simply by adding the class . list-inline to the <ul> or <ol> , and the class .

How do I remove bullets from UL using bootstrap?

If you're using the Bootstrap framework you can simply apply the class . list-unstyled on the <ul> or <ol> element. It removes the bullets (or list markers) as well as the left padding from the list items which are immediate children of the <ul> or <ol> element.

How can you add a badge to a list group in bootstrap?

Add the badges component to any list group item and it will automatically be positioned on the right. Just add <span class = "badge"> within the <li> element.


1 Answers

By default ul has padding and margin which Bootstrap removes in its CSS.

So try adding it.

@import url('//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap-theme.min.css');


ul {
    list-style-type: disc !important;
    padding-left:1em !important;
    margin-left:1em;
}
<link href="https://netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet"/>
<script src="https://netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>
<ul>
    <li>Why</li>
    <li>are</li>
    <li>there</li>
    <li>no</li>
    <li>bullets?!?!?!!?!?!?</li>
</ul>
like image 131
divy3993 Avatar answered Oct 01 '22 00:10

divy3993