Join James Williamson for an in-depth discussion in this video Creating rollovers, part of CSS: Styling Navigation.
Our menu is almost complete.…Really, the last major thing that we need to do is add a rollover effect to add a little…bit of interactivity to the menu.…So I am going to be working with the vertical.htm from the 03_07 directory.…And in order to create a rollover effect, we are going to have to create a new selector.…So I'm going to scroll down in my vertical menu styles, and I am just going to create…a new selector right below my last one here.…Now, we've been using the pseudo-class selectors for a while now.…So, the hover pseudo-class selector probably will come as no surprise to you that, that…is what we need to use. So, I'm going to type in li a:hover.…
So again, that's targeting any links inside of the list item, and we are going to use…the hover pseudo-class, so we are saying that when those links are being hovered over.…All right, I am going to go ahead and open and close my curly brackets there.…And inside that, I am just going to apply some properties that I think would make a nice rollover.…First thing I am going to do is change the background color.…
- 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.