Join James Williamson for an in-depth discussion in this video Controlling link spacing, part of CSS: Styling Navigation.
Okay, our menu is looking pretty good, but right now, there is just no visual separation…between the links themselves.…If I come up to the menu, and I kind of hover over these links, sometimes it's not quite…obvious which one I'm hovering over because there's just no separation between them.…So in this exercise, we're going to take a look at one of the ways that we can add some visual separation.…So, I'm going to go back in my code editor, and I'm working with the vertical.htm file…found in the 03_05 directory.…And you can see once again I've sort of scrolled down to our vertical menu styles.…
We're going to continue working with the same selector, which is the one that's targeting…the links inside of the list items, the li a selector.…I'm just going to go down to the bottom of this.…And I'm sure some of you guys have already sort of figured out that if you want the separation…between elements, margins would be a good place to start.…You're right, margins would work great.…The same way that padding adds a little bit of interior space to our menu items, margins…
- 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.