From the course: HTML & CSS: Creating Forms

Unlock the full course today

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

Styling select

Styling select - HTML Tutorial

From the course: HTML & CSS: Creating Forms

Start my 1-month free trial

Styling select

- [Instructor] In this video we'll look at different ways to style the select element. This is what our finished page will look like. We have four select menus here. The first two are regular select menus, and then the last two have the multiple attribute added to them, so you can select more than one option. The second of each set has optgroup in it so you can see the categories. This is what our HTML looks like without any styles as we're starting out. So, going to the CSS, the first thing we're going to do is style the select menu. I'm on line nine. And add a display of block, which will make them go up and down vertical on the page rather than across. And then add a margin bottom of 20 pixels to put some space between them. And I go back to the browser and refresh. It already looks a little bit nicer. Now, when you click on the menu and see this pop up with your choices, that part of it is not stylable with CSS. The only way to style it is through JavaScript. So the styles I'm…

Contents