From the course: Building Responsive Forms with Flexbox
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Creating responsive checkbox groups - CSS Flexbox Tutorial
From the course: Building Responsive Forms with Flexbox
Creating responsive checkbox groups
- One of the trickier aspects of creating responsive forms is dealing with groups of checkboxes and radio buttons. In this exercise, we're going to use Flexbox to create responsive columns of checkboxes and then control their alignment. To do that I'll be working with the forms.htm file found in the 02-05 directory. And before we can write our selectors, let's go down and take a look at the structure of these checkbox groups that we want to control. So if I scroll down a little bit in this section for sessions, about line 192 or so, we have a section of skills. So we have an unordered list with a class of form-skills. Inside that we have individual list items that have a checkbox along with a label for that checkbox. So you can see each one of these has a different skill, but it's a repeating structure. So we have a list item that contains both the input of checkbox and the label. Notice the input is first, label is second. So our first one is form-skills. We have quite a few of…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
(Locked)
Longer form structure4m 13s
-
(Locked)
Sectioning form content5m 45s
-
(Locked)
Refining basic styling7m 11s
-
Creating responsive inputs and labels7m 41s
-
(Locked)
Creating responsive checkbox groups7m 47s
-
(Locked)
Making form sections responsive5m 31s
-
(Locked)
Controlling section spacing4m 34s
-
(Locked)
Adding media queries2m 39s
-
(Locked)
-