Join James Williamson for an in-depth discussion in this video Styling menus with borders, part of CSS: Styling Navigation.
- View Offline
- Exercise Files
- Code Practice
Borders can add a great deal of flexibility to your menu styling.…You can use them to indicate a current menu item, define the actual regions of your links,…accent your links in multiple ways, or as we're going to do in this exercise, help create…visual separation between the link elements.…So we're going to be working once again on vertical.htm, this time from the 03_06 folder--…although we're really just sort of picking up from right where we left off again.…All right, so in the last exercise we created a little bit of visual space using margins,…and if I flip over to the browser, you can kind of see how this is working.…
We've got a bottom-margin applied to all of these list items.…The problem here, of course, is that the background color of the page is shining through, and…that's not always going to be appropriate.…So, what I'm going to do is I'm just going to come down, and I'm going to replace the…bottom-margin here, and I'm going to do a border-bottom.…So you're free, of course, to apply borders all the way around the links if you want to.…
- 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.