1
00:00:00,360 --> 00:00:03,840
Using Bootstrap we can add style to list groups.

2
00:00:03,840 --> 00:00:08,640
This HMO page shows an example of basic list group formatting.

3
00:00:08,690 --> 00:00:11,880
Here we have three items around.

4
00:00:11,890 --> 00:00:17,810
Each item is some padding and also a border in order to create this.

5
00:00:17,810 --> 00:00:22,910
We start with an unordered list is shown here.

6
00:00:22,920 --> 00:00:26,190
We then create a class attribute and set it to list.

7
00:00:26,190 --> 00:00:26,580
Group

8
00:00:29,260 --> 00:00:31,410
next we create our list items.

9
00:00:31,570 --> 00:00:36,550
Each list item must have a class attribute set to list group item

10
00:00:40,080 --> 00:00:42,830
then it's just a matter of inserting your labels for the.

11
00:00:42,960 --> 00:00:48,510
For this demonstration we've set it to item 1 2 and 3.

12
00:00:48,720 --> 00:00:56,100
We can also add badges and icons to our list items by creating a spend element with the badge class

13
00:00:56,370 --> 00:01:04,500
inside the list item so if we wanted to add a badge to item number 1 we can do so as follows.

14
00:01:11,460 --> 00:01:19,500
As you can see we've added a badge on the first item with the value of 12 and you can copy and paste

15
00:01:19,500 --> 00:01:22,970
this code and we'll make one for Item number 2 as well

16
00:01:26,610 --> 00:01:27,000
next.

17
00:01:27,000 --> 00:01:34,530
By converting the list items to links we can also create a mouse over effect so we'll go ahead and do

18
00:01:34,530 --> 00:01:39,350
that we'll just delete our list items.

19
00:01:42,260 --> 00:01:49,910
And insert this code will create 3.

20
00:01:49,970 --> 00:01:51,980
So just go ahead and insert your links.

21
00:01:53,420 --> 00:01:54,050
As shown here

22
00:01:58,300 --> 00:02:04,860
you can see that it's just an A element which with an H R you have attribute in the class attribute

23
00:02:04,860 --> 00:02:11,830
set to list group item and it's the same for each item just have to change the label.

24
00:02:12,520 --> 00:02:19,480
So now when we save our file and refresh you can see that we have a hover effect a mouse over effect

25
00:02:20,200 --> 00:02:21,520
on each list item.

26
00:02:23,780 --> 00:02:28,360
We can set a list item to active by applying the active class.

27
00:02:29,600 --> 00:02:37,480
So if we just take an active year you can see that it's activated.

28
00:02:37,510 --> 00:02:41,470
Item 1.

29
00:02:41,970 --> 00:02:44,760
The same can be done for a disabled item.

30
00:02:44,760 --> 00:02:50,550
You can type in disabled an Item 2 is now disabled and cannot be put on

31
00:02:53,900 --> 00:03:01,960
contextual classes can also be added by creating the necessary classes in the list items so let's go

32
00:03:01,960 --> 00:03:12,970
ahead and just delete the disabled in active class and we'll start with the success contextual class.

33
00:03:13,130 --> 00:03:14,500
So type in list rule

34
00:03:18,970 --> 00:03:23,870
success and refresh.

35
00:03:24,040 --> 00:03:27,010
So that's the first one we'll add a couple of others

36
00:03:29,900 --> 00:03:31,340
and the others were warning

37
00:03:34,120 --> 00:03:36,410
and we'll add one last one just.

38
00:03:37,160 --> 00:03:45,310
What we're going to add the danger contextual class and so you can see some pretty neat styling on this

39
00:03:45,320 --> 00:03:45,510
loop.

40
00:03:49,720 --> 00:03:56,140
Another great benefit of working with lists is you can add nearly any HMO element inside the list group

41
00:03:56,140 --> 00:03:57,900
item.

42
00:03:57,940 --> 00:04:05,230
We have two classes available to us in bootstrap including list group item heading and list group item

43
00:04:05,230 --> 00:04:09,180
text which can be used to add custom content.

44
00:04:09,340 --> 00:04:13,170
So we'll go ahead and create a custom list so you can you can follow along.

45
00:04:13,330 --> 00:04:16,780
First insert in place of Item 1

46
00:04:19,450 --> 00:04:20,740
insert this line of code

47
00:04:24,580 --> 00:04:28,820
so here we've used the list group item heading.

48
00:04:28,890 --> 00:04:37,030
So we've given our list item a heading and now we can insert some basic text content in a paragraph

49
00:04:37,870 --> 00:04:46,310
element give the paragraph element the class list group item text and so when you refresh it you can

50
00:04:46,310 --> 00:04:54,490
see that there's some heading and some text inside the first list item and now you can copy and paste

51
00:04:54,580 --> 00:04:55,150
this blog.

52
00:04:56,510 --> 00:04:59,840
And do the same where the other items

53
00:05:05,290 --> 00:05:07,790
then that's what the final result should look like.
