From the course: HTML and CSS: Creating Forms

Unlock this course with a free trial

Join today to access over 25,300 courses taught by industry experts.

Styling text inputs

Styling text inputs

- [Instructor] In this video, you'll learn how to style a text entry input. This will cover all the different inputs where you type text or numbers. We're going to start out with a webpage where I've included one of each type of field. So this is what all of them look like without any styles. In the CSS at the top, the first two things I have are the default styles that we looked at in the last video, and then after that we just have a list of several of the input elements as selectors with no styles applied to them yet. So I'm going to start by applying a width to all of these inputs in the text area. So I'm just standing width 12em and save. The reason I'm not just applying to the input element by itself without the type specified is because there are some inputs I don't want to change, like the input submit button. Back in the browser, I am going to refresh and now you can see that they're all the same width. Unlike the pixels I used in the previous video, now I'm using Ems to size…

Contents