Seasonal Savings: 20% off selected memberships for a limited time. Give now

Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member

Adding and removing space between the navigation links

From: Typography for Web Designers

Video: Adding and removing space between the navigation links

In this lesson we're going to start making the links in the modernist bibliography look the way we want them to. One thing we need to attend to in the process is the space between the navigation links. You'll need the files biblio_sans_ linkstates.html and biblio_sans_linkatates.css from the Exercise folder. Open up the HTML file in the browser to see what we're working with. Al the links are in place, but they're defaulting to blue and they're underlined and the links at the top all run together in a single line with no space between them.

Adding and removing space between the navigation links

In this lesson we're going to start making the links in the modernist bibliography look the way we want them to. One thing we need to attend to in the process is the space between the navigation links. You'll need the files biblio_sans_ linkstates.html and biblio_sans_linkatates.css from the Exercise folder. Open up the HTML file in the browser to see what we're working with. Al the links are in place, but they're defaulting to blue and they're underlined and the links at the top all run together in a single line with no space between them.

We're going to style the navigation links so they look the way we want them to. Here is a screenshot of what they should look like. So let's open up our CSS. First, let's note that the syntax were about to write is for the navigation links. I'm going to go ahead and select this notation and copy it and down at the bottom where we've started some of our syntax for our links, I'm going to paste it and I'm going to write in that this is for our navigation links.

Now we'll add the four states we need to work with and since these are for the navigation links and they're in an unordered list, we're going add the ul in front of the pseudo-class selectors. So there's our Love link and visited and now we'll do our Hate, hover and active, and now we can start styling these.

What we want to do is we want to think about the things that are going to stay consistent between the four states, because the consistent styles we can actually add to our ul and our li syntax. First of all, we like the links to be centered, so let's add that up to the ul, so that the entire list will be centered. Text align: center. We also want the links to all have the same size and line-height we can add that down here with our list item, our li. We'll set out font-size to 1.4em and our line-height to 2.4em.

Now we can style the individual links. Let's start with our a:link here. We wanted to have a color and let see the color is the same as our background color, which is fcf8cf. And we don't want any text decoration, so text-decoration is none, and we want to have background color and we're going to use a blue and that is 264c73.

We also want it to have some space. We're going to put padding along the top of 1em, padding on the right of 0.6em, padding on the bottom of 0.6em and padding on the left also of 0.6em. This syntax tells the links to be light yellow on a blue background, to not have an underline and to have space surrounded.

I added slightly more space above the links than on the other sides, because otherwise they tend to feel a little bit too high in the background color. Let's save and review this in our browser. It's starting to look good, but we have some work to do. We can set the other three states of our links. We're going to go ahead and copy and paste into our next state here, our visited state. When working with a background color it is extra important to copy and paste, because we're setting these padding, these measurements of space around the link, and if those accidentally get changed from one state to another, then when you rollover a link or you click on it, the size of the background color will change on you and the links will sort of move around. So we want to keep those consistent.

Our visited state isn't going to change from our link state because we decided that the visited link should look the same as the other links, as the regular unvisited link, but the hover is going to change. The hover is going to have a different color background. It needs to be 143352, and then finally we can also do the syntax for our active state and here the active state is going to have the same background color as our hover, so I can copy and paste that, but it's also going to have a slightly darker text color.

So we need to put that in. We're going to use d1cb94. Let's save this and review it in our browser and see how it's looking on the hover. Excellent! It's turning that darker blue and when we click just for a moment there, you can see that the text gets slightly darker. Hopefully you can see that. It's very subtle. I know you might be viewing this on a pretty small screen, okay.

So the states are all set, but there's still one thing here that doesn't look the way that we had set it up to look, and that these lines of space are coming up in between the links. And that doesn't make sense, because in the universal selector we've set all of our margins and padding to 0. So this space shouldn't be showing up, but let's go into the CSS and I'll show you what's happening. So first of all in the CSS, our margin and padding is 0, so it shouldn't be happening. Let's go into our HTML.

What we were running into here is a bit of a glitch. These line items, which are our main navigation, they're on different lines in the HTML and when that happens it automatically puts this little bit of space between them. So all we have to do is delete the returns that were put into the syntax. So now when you look at this, the syntax, it all just runs and there are no returns in there and that should get rid of the spaces now that we've removed that, and it did.

You know, putting a return in your syntax is not supposed to change the way the web site looks in a browser, but sometimes it does. That's a glitch and that's how you get rid of it. It looks great! So excellent! Our navigation links look good!

Show transcript

This video is part of

Image for Typography for Web Designers
Typography for Web Designers

74 video lessons · 14311 viewers

Laura Franz
Author

 
Expand all | Collapse all
  1. 6m 18s
    1. Welcome
      1m 9s
    2. Using the exercise files
      1m 57s
    3. Things to consider before starting this course
      3m 12s
  2. 41m 3s
    1. Understanding how good typography promotes reading
      2m 9s
    2. Understanding legibility
      4m 41s
    3. Understanding how fonts convey meaning
      5m 19s
    4. Choosing web-safe fonts to convey meaning
      6m 13s
    5. Using font size, case, style, letter spacing, weight, and color to convey meaning
      6m 22s
    6. Choosing web fonts to convey meaning
      6m 23s
    7. Downloading web fonts
      4m 9s
    8. Applying web fonts in CSS with @font-face
      5m 47s
  3. 38m 0s
    1. Choosing a web-safe font for use in text
      4m 13s
    2. Applying the web-safe font to the text and the heading
      3m 4s
    3. Setting a class for the resource titles in the text
      3m 45s
    4. Choosing a second web-safe font for the heading
      2m 42s
    5. Applying the second font to the heading
      2m 16s
    6. Choosing a web font from the Google Font API for use in text
      5m 44s
    7. Adding and applying the Google Font API syntax
      4m 29s
    8. Choosing a second web font from the Google Font API for the heading
      2m 56s
    9. Adding and applying the second font to the heading
      4m 52s
    10. Analyzing the fonts on some professional sites
      3m 59s
  4. 55m 31s
    1. Understanding how we read
      4m 34s
    2. Finding and applying a good font size and line height
      4m 50s
    3. Finding and applying a good line length
      8m 6s
    4. Understanding ems
      6m 17s
    5. Using ems to set font size
      6m 9s
    6. Using ems to set line length
      3m 40s
    7. Understanding how color affects readability
      3m 58s
    8. Improving a color palette by improving contrast
      5m 39s
    9. Improving a color palette by reducing optical vibration
      4m 59s
    10. Analyzing text readability on the professional sites
      7m 19s
  5. 1h 11m
    1. Understanding how we "chunk" visual elements
      3m 59s
    2. Developing a system of hierarchy
      2m 17s
    3. Applying hierarchy in HTML and CSS
      7m 16s
    4. Developing a system to help chunk text for readers
      6m 1s
    5. Applying the system in the CSS
      4m 19s
    6. Changing an element by creating and applying a class
      5m 0s
    7. Using multiple columns to create hierarchy
      4m 12s
    8. Building a two-column system in HTML and CSS
      10m 56s
    9. Refining the horizontal space in a two-column layout
      6m 1s
    10. Adding rule lines to improve chunking
      5m 50s
    11. Adding emphasis within a heading
      4m 36s
    12. Analyzing the chunking on the professional sites
      11m 18s
  6. 17m 57s
    1. Understanding classic and modernist typographic pages
      7m 3s
    2. Understanding how to create rhythm and tension
      6m 0s
    3. Applying typography skills when making design decisions
      4m 54s
  7. 55m 47s
    1. Designing typographic links for the traditional page
      5m 54s
    2. Adding a list of links to the traditional page
      8m 44s
    3. Describing the link states in CSS
      6m 30s
    4. Returning links to their original "unvisited" style
      2m 38s
    5. Using different CSS for different kinds of links
      7m 28s
    6. Using CSS notation to organize syntax
      5m 34s
    7. Choosing a background color or image
      4m 0s
    8. Applying a repeating background image
      2m 58s
    9. Shaping the traditional page layout
      6m 38s
    10. Analyzing the traditional typographic elements on the professional sites
      5m 23s
  8. 43m 0s
    1. Designing typographic links for the modernist page
      6m 47s
    2. Making a list of links run across the page
      2m 14s
    3. Adding and removing space between the navigation links
      6m 50s
    4. Styling the inline links on the modernist page
      5m 33s
    5. Choosing a background color or image for the modernist bibliography
      4m 4s
    6. Applying a no-repeat background image
      4m 13s
    7. Shaping the modernist page layout
      6m 58s
    8. Analyzing the modernist typographic elements on the professional sites
      6m 21s
  9. 52m 53s
    1. Fixing quotation marks and apostrophes
      6m 59s
    2. Fixing dashes
      6m 33s
    3. Working with lining figures (numbers) and acronyms
      9m 28s
    4. Fixing characters that don't look right
      8m 19s
    5. Hanging punctuation
      2m 54s
    6. Applying typographic accents
      2m 36s
    7. Vertically centering text
      5m 18s
    8. Creating drop caps
      5m 59s
    9. Analyzing the typographic details on the professional sites
      4m 47s
  10. 3m 9s
    1. Additional resources
      3m 9s

Start learning today

Get unlimited access to all courses for just $25/month.

Become a member
Sometimes @lynda teaches me how to use a program and sometimes Lynda.com changes my life forever. @JosefShutter
@lynda lynda.com is an absolute life saver when it comes to learning todays software. Definitely recommend it! #higherlearning @Michael_Caraway
@lynda The best thing online! Your database of courses is great! To the mark and very helpful. Thanks! @ru22more
Got to create something yesterday I never thought I could do. #thanks @lynda @Ngventurella
I really do love @lynda as a learning platform. Never stop learning and developing, it’s probably our greatest gift as a species! @soundslikedavid
@lynda just subscribed to lynda.com all I can say its brilliant join now trust me @ButchSamurai
@lynda is an awesome resource. The membership is priceless if you take advantage of it. @diabetic_techie
One of the best decision I made this year. Buy a 1yr subscription to @lynda @cybercaptive
guys lynda.com (@lynda) is the best. So far I’ve learned Java, principles of OO programming, and now learning about MS project @lucasmitchell
Signed back up to @lynda dot com. I’ve missed it!! Proper geeking out right now! #timetolearn #geek @JayGodbold
Share a link to this course

What are exercise files?

Exercise files are the same files the author uses in the course. Save time by downloading the author's files instead of setting up your own files, and learn by following along with the instructor.

Can I take this course without the exercise files?

Yes! If you decide you would like the exercise files later, you can upgrade to a premium account any time.

Become a member Download sample files See plans and pricing

Please wait... please wait ...
Upgrade to get access to exercise files.

Exercise files video

How to use exercise files.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.


Exercise files

Exercise files video

How to use exercise files.

For additional information on downloading and using exercise files, watch our instructional video or read the instructions in the FAQ .

This course includes free exercise files, so you can practice while you watch the course. To access all the exercise files in our library, become a Premium Member.

Join now Already a member? Log in

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.


Mark all as unwatched Cancel

Congratulations

You have completed Typography for Web Designers.

Return to your organization's learning portal to continue training, or close this page.


OK
Become a member to add this course to a playlist

Join today and get unlimited access to the entire library of video courses—and create as many playlists as you like.

Get started

Already a member ?

Become a member to like this course.

Join today and get unlimited access to the entire library of video courses.

Get started

Already a member?

Exercise files

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships. Learn more

Get started

Already a Premium member?

Exercise files video

How to use exercise files.

Ask a question

Thanks for contacting us.
You’ll hear from our Customer Service team within 24 hours.

Please enter the text shown below:

The classic layout automatically defaults to the latest Flash Player.

To choose a different player, hold the cursor over your name at the top right of any lynda.com page and choose Site preferences from the dropdown menu.

Continue to classic layout Stay on new layout
Exercise files

Access exercise files from a button right under the course name.

Mark videos as unwatched

Remove icons showing you already watched videos if you want to start over.

Control your viewing experience

Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.

Interactive transcripts

Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.

Learn more, save more. Upgrade today!

Get our Annual Premium Membership at our best savings yet.

Upgrade to our Annual Premium Membership today and get even more value from your lynda.com subscription:

“In a way, I feel like you are rooting for me. Like you are really invested in my experience, and want me to get as much out of these courses as possible this is the best place to start on your journey to learning new material.”— Nadine H.

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.