Button Groups

5 minutes
Share the link to this page
You need to have access to the item to view this lesson.
One-time Fee
List Price:  $139.99
You save:  $40
List Price:  €131.73
You save:  €37.64
List Price:  £112.47
You save:  £32.13
List Price:  CA$193.14
You save:  CA$55.18
List Price:  A$218.27
You save:  A$62.36
List Price:  S$191.03
You save:  S$54.58
List Price:  HK$1,096.34
You save:  HK$313.26
CHF 91.31
List Price:  CHF 127.84
You save:  CHF 36.52
NOK kr1,099.13
List Price:  NOK kr1,538.83
You save:  NOK kr439.69
DKK kr702.04
List Price:  DKK kr982.89
You save:  DKK kr280.84
List Price:  NZ$237.92
You save:  NZ$67.98
List Price:  د.إ514.10
You save:  د.إ146.89
List Price:  ৳15,356.49
You save:  ৳4,387.88
List Price:  ₹11,705.89
You save:  ₹3,344.78
List Price:  RM670.83
You save:  RM191.68
List Price:  ₦168,151.32
You save:  ₦48,046.66
List Price:  ₨38,919.49
You save:  ₨11,120.65
List Price:  ฿5,133.99
You save:  ฿1,466.96
List Price:  ₺4,548.41
You save:  ₺1,299.64
List Price:  B$725.86
You save:  B$207.40
List Price:  R2,668.37
You save:  R762.44
List Price:  Лв257.70
You save:  Лв73.63
List Price:  ₩194,966.22
You save:  ₩55,708.61
List Price:  ₪528.13
You save:  ₪150.90
List Price:  ₱7,973.62
You save:  ₱2,278.34
List Price:  ¥21,641.98
You save:  ¥6,183.86
List Price:  MX$2,353.45
You save:  MX$672.46
List Price:  QR512.38
You save:  QR146.40
List Price:  P1,938
You save:  P553.75
List Price:  KSh18,408.68
You save:  KSh5,260
List Price:  E£6,792.74
You save:  E£1,940.92
List Price:  ብር7,993.99
You save:  ብር2,284.16
List Price:  Kz116,758.56
You save:  Kz33,361.97
List Price:  CLP$136,180.87
You save:  CLP$38,911.60
List Price:  CN¥1,013.33
You save:  CN¥289.54
List Price:  RD$8,302.55
You save:  RD$2,372.32
List Price:  DA18,879.17
You save:  DA5,394.43
List Price:  FJ$318.96
You save:  FJ$91.14
List Price:  Q1,089.53
You save:  Q311.31
List Price:  GY$29,272.17
You save:  GY$8,364.07
ISK kr14,179.58
List Price:  ISK kr19,851.98
You save:  ISK kr5,672.40
List Price:  DH1,422.27
You save:  DH406.39
List Price:  L2,491.82
You save:  L712
List Price:  ден8,108.89
You save:  ден2,316.99
List Price:  MOP$1,128.31
You save:  MOP$322.39
List Price:  N$2,664.06
You save:  N$761.21
List Price:  C$5,171.92
You save:  C$1,477.79
List Price:  रु18,678.28
You save:  रु5,337.03
List Price:  S/520.72
You save:  S/148.78
List Price:  K531.82
You save:  K151.96
List Price:  SAR525.11
You save:  SAR150.04
List Price:  ZK3,523.21
You save:  ZK1,006.70
List Price:  L655.55
You save:  L187.31
List Price:  Kč3,325.75
You save:  Kč950.28
List Price:  Ft52,031.05
You save:  Ft14,867.07
SEK kr1,095.61
List Price:  SEK kr1,533.90
You save:  SEK kr438.29
List Price:  ARS$121,552.04
You save:  ARS$34,731.63
List Price:  Bs970.99
You save:  Bs277.44
List Price:  COP$541,816
You save:  COP$154,815.63
List Price:  ₡70,374.06
You save:  ₡20,108.31
List Price:  L3,468.86
You save:  L991.17
List Price:  ₲1,036,507.98
You save:  ₲296,166.29
List Price:  $U5,445.86
You save:  $U1,556.07
List Price:  zł571.20
You save:  zł163.21
Already have an account? Log In


Hello, in this bootstrap four video, we're going to be looking at button groups. Button groups allow you to group a series of buttons together, it allows you to perform either on a single line or vertically however you want is easy to switch between them. We'll show you both of them. So what we mean by grouping buttons, aka you know, these buttons right here, you can basically group them so they're connected together, keep similar buttons together as essentially what we're going to be showing you plus also, there's other videos in this series that will show you different button types where there is a drop down button. Whether it's a radio button or a checkbox button. Doesn't matter what it is, you can easily substitute one of those buttons for a button.

Within the button groups. We're just going to use simple buttons like we've used so far. But it locks and it's very easy. Just substitute one of the buttons for one of those buttons. So if you just go to your text editor What I'm going to do is add a couple of new lines, just so it's easier to see. First of all, you need to put a div.

And that div is essentially the container for your buttons, aka your button group, need to put a class which is btn dash group. This has a role of group. When I say group, you almost sound like Groot from Guardians of the Galaxy area dash label. No, I don't think I need a label. Now we can admit that and now I'm gonna put some buttons. Like I said, the buttons are essentially what we've already used right here.

So actually, you know what, I'm not even going to put a button here, copy and paste it. So you can actually see, it is literally the same, so I'm gonna use the wrong key to copy that. Copy that one. But many of you aren't really, I'm gonna get this one very up. Then I had this exactly on that look. And then let's get this one's got a small one.

So far, let's paste this inside, save it, go to the browser refresh. There we go. We have a button group first, actually, I'm also going to add some breakpoints at the end. So it's a little easier to see save that refresh. There we go. We have our button group.

And as you can sort of see, the buttons are usually have rounded edges. You can rounded corners, sorry, they usually have rounded corners you can easily do That is to border radius in CSS, if you don't want to just remove it's very simple. But if you put them in a button group, only the one at the end have that border radius, aka, the curve on the corner. Any buttons in the middle don't. So that's really cool. So I'd have to mess around with that just to make it look good.

And as you can see, obviously, small one doesn't look very good. So you will probably want to think about what you're doing when you're doing button groups. So you get buttons that look very nice. I'm just gonna copy a few more in so you can simply see, copy these in really on to the save it, refresh the browser, and as you can see, none of the buttons in the middle have curved corners, only the ones at the edges do. So that's bottom groups. Okay, we're also going to show you how to vertically align them.

And to do that, all you do instead of btn dash group people btn dash group dash, vertical, save it, refresh, and as you can see, they are now aligned vertically and the same principle still applies, aka any buttons in the middle. Don't have, sorry, don't have curved corners, and neither do the corners of the buttons at the edge there are facing in zoid aka these two here, and these two right here with button groups that are vertical, you can easily add other buttons as well wherever it's drop down button radio buttons, the process is exactly the same. So that's button groups. If you have any questions feel free to post them on some are learning Dakota UK for slash question dot php and Well, how so will the community, please rate, comment and subscribe and it'll really help keep the content free. Plus, there'll be another link in the description, which will be the source code from this video.

So check that out. And as usual, thanks for watching, and I hope you have a great day.

Sign Up


Share with friends, get 20% off
Invite your friends to LearnDesk learning marketplace. For each purchase they make, you get 20% off (upto $10) on your next purchase.