From the course: Creating a Responsive Web Design

Unlock this course with a free trial

Join today to access over 22,400 courses taught by industry experts.

Styling the nav list items and links

Styling the nav list items and links - CSS Tutorial

From the course: Creating a Responsive Web Design

Styling the nav list items and links

- So, now we're going to set some styles for the list items and the anchor tags, and we'll also set pseudo classes for hover for H as well. So, back in our CSS file after our nav space ul let's hit a few lines. We're first going to target the anchor tags. So, we'll tag nav space ul space li space a. Inside of here what we're going to do is redefine how these anchor tags are behaving. So, we're going to come in and first set a display type of inLine-block. This will make these behave a little bit more like graphics rather than inLine elements. Next line we're going to set color. We're going to set that to white. Next we'll set the padding 10px on the top and bottom. 20px on the right and left. Next we'll set text-decoration. We're going to set this to none. This will remove the underlines. Now we're going to set a width of 125px. Setting a width on these individual anchor tags when they have a display type set to inLine-block will allow us to define the width of the submenus. So, when…

Contents