Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bootstrap: list-inline with bullets?

Anybody knows, how to add bullets/separators between elements in horizontal list in Bootstrap 3?

<ul class="list-inline">
   <li>Author: Michal</li>
   <li>Modified: 17.08.2014</li>
   <li>Comments: 5</li>
</ul>
like image 501
Michał Kalinowski Avatar asked Aug 17 '14 21:08

Michał Kalinowski


People also ask

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 add bullet points in bootstrap?

My suggestion is better use ul and li to make a list. And you can use list-style-type: square; on ul element to change the style of list item. I just used inline CSS here, you may add the style into your css file. For your reference, here is the HTML-List and list-style-type definition and usage.

How do I make a horizontal list in bootstrap?

Horizontal List Groups. If you want the list items to display horizontally instead of vertically (side by side instead of on top of each other), add the . list-group-horizontal class to .

Can you enumerate the various lists supported by bootstrap?

The most basic list group is an unordered list with list items: First item. Second item. Third item.


Video Answer


1 Answers

Thy this CSS:

.list-inline{display:block;}
.list-inline li{display:inline-block;}
.list-inline li:after{content:'|'; margin:0 10px;}

you can see fiddle here.

Needless to say you can use anything you want instead of a pipe separator, this is just an example

like image 133
Devin Avatar answered Oct 06 '22 03:10

Devin