Site Navigation with CSS in Dreamweaver
Illustration by John Hersey

Identifying external links


From:

Site Navigation with CSS in Dreamweaver

with Joseph Lowery

Video: Identifying external links

For some web sites, especially those for government and large corporations, it's important to differentiate between links to pages within the site and links to external sites. In this video, I'll show you how to set up a single CSS rule that can add an identifying icon to all your external links in one fell swoop. The icon we'll be using is one that has gained a good deal of acceptance on the web, from Wikipedia to the Federal Health and Human Services web site. You can find it here on WIKIMEDIA COMMONS, and it's this icon here that we see in a larger version.
Expand all | Collapse all
  1. 2m 20s
    1. Welcome
      1m 2s
    2. Using the exercise files
      1m 18s
  2. 9m 26s
    1. Using icons in navigation
      2m 14s
    2. Understanding 3D nav bars
      2m 25s
    3. Understanding explanatory navigation
      1m 51s
    4. Creating animated navigation
      2m 56s
  3. 1h 14m
    1. Inserting Spry horizontal menus
      7m 4s
    2. Styling Spry menus
      6m 29s
    3. Adding Spry vertical menus
      5m 7s
    4. Styling Spry vertical menus
      10m 53s
    5. Using Spry tabbed navigation
      9m 33s
    6. Styling Spry tabbed menus
      9m 55s
    7. Including Spry accordion panel menus
      5m 32s
    8. Styling Spry accordion menus
      11m 10s
    9. Advanced Spry menu techniques
      8m 32s
  4. 35m 45s
    1. Converting lists to menus
      7m 56s
    2. Working with background images
      5m 47s
    3. Implementing sprites
      5m 53s
    4. Setting up adjustable backgrounds
      9m 4s
    5. Designing accessible navigation
      7m 5s
  5. 30m 34s
    1. Looking at the project
      1m 4s
    2. Building up the basic HTML
      2m 9s
    3. Displaying top-level links horizontally
      8m 12s
    4. Customizing the link states
      4m 29s
    5. Adding drop-down menus (HTML)
      3m 48s
    6. Working with submenus (CSS)
      4m 8s
    7. Achieving interactive submenus
      2m 21s
    8. Marking the current page
      4m 23s
  6. 23m 13s
    1. Looking at the project
      57s
    2. Understanding vertical menus
      2m 15s
    3. Defining width for link elements
      4m 43s
    4. Using background graphics with navigation
      5m 45s
    5. Creating pop-out vertical navigation
      6m 29s
    6. Setting link states
      3m 4s
  7. 10m 13s
    1. Identifying anchor tags
      7m 4s
    2. Identifying external links
      3m 9s
  8. 18m 14s
    1. Creating jQuery animated image menus
      7m 45s
    2. Using the HTML5 nav tag
      3m 24s
    3. Exploring CSS3 enhancements
      7m 5s
  9. 28s
    1. Next steps
      28s

Start your free trial now, and begin learning software, business and creative skills—anytime, anywhere—with video instruction from recognized industry experts.

Start Your Free Trial Now
please wait ...
Watch the Online Video Course Site Navigation with CSS in Dreamweaver
3h 24m Intermediate Mar 22, 2011

Viewers: in countries Watching now:

Join Joseph Lowery in Site Navigation with CSS in Dreamweaver as he explores current design trends in site navigation and shows designers and developers how to create robust CSS-based navigation. The course shows how to convert HTML lists to graphical controls that integrate seamlessly with an existing site design, and how to build menus with a wide range of navigation options, all in standards-compliant CSS. Exercise files accompany the course.

Topics include:
  • Using icons
  • Navigating with Spry widgets
  • Styling Spry menus
  • Working with background images
  • Implementing sprites
  • Designing navigation with accessibility in mind
  • Adding drop-down menus
  • Developing graphical navigation with jQuery
  • Creating pop-out vertical navigation
  • Exploring CSS3 and HTML5 enhancements
Subject:
Web
Software:
Dreamweaver
Author:
Joseph Lowery

Identifying external links

For some web sites, especially those for government and large corporations, it's important to differentiate between links to pages within the site and links to external sites. In this video, I'll show you how to set up a single CSS rule that can add an identifying icon to all your external links in one fell swoop. The icon we'll be using is one that has gained a good deal of acceptance on the web, from Wikipedia to the Federal Health and Human Services web site. You can find it here on WIKIMEDIA COMMONS, and it's this icon here that we see in a larger version.

And we're going to be using one of the smaller varieties. So let's go back to Dreamweaver. And here I have two links that actually go to external sites: this Take the tour and a little bit further down, Check 'em out. So I want to add a CSS rule that looks at the value of the href attribute, and if it starts with an http, then apply this rule. So let's go ahead and go to Split view. And I am going to go ahead and put this in the main.css. I'll put this down at the bottom.

And the CSS rule that we're going to adopt is starting off with the anchor tag, and then you use square brackets whenever you're trying to reference an attribute within a tag. So I'll do an opening and closing, just to make sure we have that. And we have to look for the href attribute. And now we need to put in a caret, which is Shift+6, and then an equal sign. The ^= sign is an advanced selector used in CSS3 that says just look at the beginning of the value for the attribute.

And what we're looking for is http, and then I'll close that. Notice that I didn't do http://, even though that would be valid for a number of sites. I initially stopped at the p in order to also encompass https sites, which are secure HTTP. All right, we have our selector, so I'll do my opening and closing curly braces. And now we're going to put in a background tag. So this is background: and then double-click on URL to open up the Select File dialog box.

And we want to choose this from the Chapter 6 > 06_02 > images folder. And you're looking for a file named external_link.png. I'll click Choose here and then enter in no-repeat. And we want to center this on the right of the link. Close off that declaration with a semicolon. And then let's add just a little bit of padding on the right in order to allow room for the icon itself. And the icon is about 12 pixels wide, so we'll just do 13 here to give us a little bit more room.

So now, when I go to Design view, you can see that I have my icon appearing right where it says Take the tour. And if I go down to Check 'em out, there is the other icon automatically added to any external link. Sweet! So hopefully this tip will come in handy when you land that lucrative government web design contract.

There are currently no FAQs about Site Navigation with CSS in Dreamweaver.

 
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

* Estimated file size

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 Site Navigation with CSS in Dreamweaver.

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 ?

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.