From the course: Building HTML5 Forms with Dreamweaver

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

CSS for styling inputs

CSS for styling inputs - Dreamweaver Tutorial

From the course: Building HTML5 Forms with Dreamweaver

Start my 1-month free trial

CSS for styling inputs

- Our next challenge in applying CSS styles to our form in the html five input types within it, is to handle the problem that right now our different form elements are not in their own rows. Now, it may look like they are in design view or even if I pop into live view in Dreamweaver, but if I check this out in a browser with a wider view port, I can see that right now my labels, my inputs have row breaks wherever they happen to break, and that's not the way I want this form to look. So I'm going to apply styling to both the label and the select element that forces them into a row of their own by using display block and adding a little margin on top to provide some spacing. And let's see how that looks in a browser. When I refresh, all the elements are in a row of their own. So in line display is the default for most form input types, and if you want to change that, you use display block.

Contents