Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Alphabetical list in bootstrap

I currently have my alphabetical list in a table and I would like to make it into a list instead using Bootstrap. I am looking at the documentation and can't find anything that I like. What is the best way to do this ? I was thinking something like this...

Have A, B, C etc on the left side and list group items on the right

Should I even use this list or something else that Bootstrap offers ? Thanks!

<ul class="list-group">
    <li class="list-group-item">First item</li>
    <li class="list-group-item">Second item</li>
    <li class="list-group-item">Third item</li>
</ul>
like image 822
Risbo Avatar asked Jan 21 '15 19:01

Risbo


People also ask

How do you make a list alphabetical order in HTML?

Complete HTML/CSS Course 2022 You can create an ordered list using the <ol></ol> tag and, define the list items using <li></li>. type="1"− This creates a numbered list starting from 1. type="A"− This creates a list numbered with uppercase letters starting from A.

What is Bootstrap list group?

List groups are a flexible and powerful component for displaying a series of content. Modify and extend them to support just about any content within. On this page. Basic example. Active items.

How do I create a list style none in Bootstrap?

To remove the list styles in Bootstrap, use the . list-unstyled class.

How do I make a horizontal list in Bootstrap?

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 . list-group : First item.


1 Answers

In HTML you can use <ol> with type attribute, like this:

<ol type="1|a|A|i|I">

Indicates the numbering type:

  • 'a' indicates lowercase letters,
  • 'A' indicates uppercase letters,
  • 'i' indicates lowercase Roman numerals,
  • 'I' indicates uppercase Roman numerals,
  • '1' indicates numbers (default).

Source: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ol#attr-type

Or use with CSS with list-style-type attribute with lower-alpha or upper-alpha, eg.:

ol { list-style: upper-alpha; }
like image 112
Guilherme Nascimento Avatar answered Oct 17 '22 00:10

Guilherme Nascimento