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.

Controlling element flexibility

Controlling element flexibility - CSS Flexbox Tutorial

From the course: Building Responsive Forms with Flexbox

Start my 1-month free trial

Controlling element flexibility

- Our over all form is now responsive, but our individual form elements are not. We can change that by setting the flex property, which as its name suggests, allows us to control an element's flexibility. So again, just to kind of review, we've set the parent form element's display to flex. But we haven't set anything yet for the individual flex items, which in this case, is the input and the button. So I'm going to go back up to my styles, and again, in this exercise, I'm working in the search.htm file, found in the 01-06 directory. And I'm going to stay in this little section down here, where we're writing all of our Flexbox styles, and I need to write a selector for my search input. So I'm just going to type in input, and we'll use another attribute selector, type equals search. Now some of you are probably wondering, wait a minute, don't we already have this selector up there? And why aren't you using that one? Well, I want to isolate all of our Flexbox styles, so we can really…

Contents