Join James Williamson for an in-depth discussion in this video Creating rollovers, part of CSS: Styling Navigation.
As with vertical menus, you use the hover pseudo-class selector to create rollover effects for horizontal menus.…In this exercise I want to take our rollovers a little bit further than we did in our vertical…menu by creating a tabbed look for them. I'm working again in the horizontal.htm.…This time from 04_06 directory, and of course we are going to have to create a new rule for our rollovers.…So I am just going to go below the last rule, which is the li a rule, and I am just going to do li a:hover.…
So the same thing we've kind of been doing to create rollovers.…We are using the hover pseudo-class selector and targeting the links inside the list items.…The very first thing I am going to do is apply a background color to this, and I am probably…going to apply a little something you're not expecting.…I am going to do red first.…Now one reason I'm doing that is because as we go through the process of creating these…rollovers, it lets you see exactly what area is defined as the rollover.…So if I were to save this, preview this in my browser, as I roll over these links you…
- Organizing menus with lists
- Creating block-level links
- Styling links, link states, and image links
- Defining link dimensions
- Controlling link spacing in a menu
- Creating rollovers
- Clearing floats
- Indicating current pages
- Controlling cursor states
- Building dropdown menus
- Creating CSS-only buttons
Skill Level Beginner
1. Structuring Navigation
2. Link Styling Basics
3. Creating a Vertical Menu
4. Creating Horizontal Menus
5. Dropdown Menus
6. Enhancing Navigation with CSS
Additional resources6m 29s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.