Start learning with our library of video tutorials taught by experts. Get started

Preparing CMS Web Graphics and Layouts Using Open Source Tools

Styling the navigation


From:

Preparing CMS Web Graphics and Layouts Using Open Source Tools

with Jen Kramer

Video: Styling the navigation

Most content management systems will write their navigation bars out as an ordered list. Even if you want that navigation bar to go horizontally, you still have an unordered list or a bulleted list, as it's also called, to work with. So let's go ahead and set that up for our navigation. We'll get rid of our default text there and we'll put it in a bulleted list. So we'll have Home, we'll have About, we'll have Contact.

Watch this entire course now—plus get access to every course in the library. Each course includes high-quality videos taught by expert instructors.

Become a member
Please wait...
Preparing CMS Web Graphics and Layouts Using Open Source Tools
1h 40m Intermediate Dec 16, 2009

Viewers: in countries Watching now:

In Preparing CMS Web Graphics and Layouts Using Open-Source Tools, Jen Kramer shows how developers and graphic designers can collaborate to create a great site design that integrates with a content management system (CMS) like WordPress, Drupal, or Joomla!, all using open-source software. This workflow is based on two existing open-source design tools, KompoZer and GIMP. Jen shows how to modify web graphics and create slices with GIMP, and then place these in an HTML page integrated with CSS in KompoZer. Along the way, she discusses web design best practices and special challenges that might arise when designing for CMS software. Exercise files are included with this course.

Topics include:
  • Using static HTML versus a CMS in web design
  • Knowing the dos and dont's of CMS design
  • Exploring GIMP and KompoZer
  • Saving slices for the web with GIMP
  • Inserting graphics in an HTML page
  • Styling web pages with CSS
  • Changing the default styling assigned by a CMS
Subjects:
Web CMS Web Graphics
Software:
GIMP KompoZer
Author:
Jen Kramer

Styling the navigation

Most content management systems will write their navigation bars out as an ordered list. Even if you want that navigation bar to go horizontally, you still have an unordered list or a bulleted list, as it's also called, to work with. So let's go ahead and set that up for our navigation. We'll get rid of our default text there and we'll put it in a bulleted list. So we'll have Home, we'll have About, we'll have Contact.

This may go on for a while. Site Map. I am not going to worry much that the links here match up exactly with the comp, because ultimately, this navigation bar is going to be coming from the content management system and the text that I am typing in right now is just a placeholder. It's going to get deleted. We're just sort of putting it here so that we can style it, so that when we transport this design over to the database in the content management system, we've at least done some of the work to getting that navigation bar looking good.

So there is our bulleted list. I've just put in four items. I am going to turn them all into links now. If you'll highlight the text and click the link icon. I am just going to type in a pound sign. That's enough to create a link. Obviously it doesn't go anywhere if you click it, but since this is placeholder text, that works just fine. And I am going to repeat the process for all four links here. Okay! So our first problem is we need to get this to not look quite so much like a bulleted list.

We're going to start by removing the bullets from the list itself, then we'll float our individual navigation items out horizontally and add a little padding, and then we'll go ahead and style them to be white and in the Georgia font and not underlined. All right, so of course all of that is CSS work, so I am going to click on the CSS icon and I am going to make a new style and that style is going to be #nav ul.

That's because I'm working with the unordered list that happens to live within the div with an ID of nav. If I was making a bulleted list in the content area, I'd probably really want the bullets. So this is an exception to the overall rules for the stylesheet. So we'll create that rule. One of the first things that we probably want to do is to get rid of the bullets. Under the Lists tab, we can set our List Style Type to none, which will get rid of all of the bullets.

Unordered lists also have either margin or padding built-in around them, and it depends on the browser as to which one it is. So in our Box we'll set our margins and our padding to 0 for the top and the right and the bottom and the left. So now you can see we have a list of links and they're all nice and tightly to the side of that navigation bar.

You may also want to sort these styles so that your #nav ul style is close with the nav style, just to make your stylesheet a little easier to read. So I am going to going to nudge that up the list. We're going to make another rule now. This one is going to be called #nav li. That's for the List Item itself and for the #nav li, which once again I'll move up just under the ul. I am going to set them to float left.

See how that puts all the links all smudged together on a single line? That's great! At least now it's going horizontally, but the spacing is all wrong as you can see. So let's put some padding along these. We'll put some left padding. Let's say it's 2 ems. That'll give us good separation between those links. Let's also give it a little bit of top padding. Let's call it 18 pixels and see what happens there. Now at least we have the links in the center of the navigation bar, so we're doing well.

Now I am going to create another style. This one is going to be called #nav a:link, #nav a:visited. So this tells me that for all links unvisited that are within the nav div and all visited links that are within the nav div, do the following. I could've just said #nav a for the generic A link.

However, sometimes that styling method doesn't necessarily work correctly in all browsers and in all situations. So I like to be a little bit more specific when creating nav link styling. And once again I am going to move that up the list. Now what we need to do is we need to make these links white, we need to make them Georgia, and we need to remove the underlines. So we can do all of that in the Text tab. So we're going to set these to be once again Georgia, Times and Serif, and we're going to set our color to be white. We'll turn off the underlines.

So that's looking pretty good. That's a pretty good match to the comp. We'll say okay and we'll save our page and let's put it in the web browser and see how we're doing. Note that we have our navigation bar and our links. Everything is looking great. One thing we might want to add is when we roll over with a link, maybe we want it to change color. That's a nice effect! So let's go ahead and add that. Back to our CSS box and we'll make a new rule.

This one will be called #nav a:hover. And I will go ahead and move that up with my other styles, and I am going to set this to turn green when we roll over it, so that color is 8aa635 and I'll say okay. Once again let's save. Let's put it in the browser and now when I roll over the links, they'll turn green.

So our page is looking really good. The top looks great, the nav bar is looking great, we have our columns in place, all the styling done. The only thing we're missing now is the footer, which is the next thing that we'll accomplish.

There are currently no FAQs about Preparing CMS Web Graphics and Layouts Using Open Source Tools.

Share a link to this course
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.
Upgrade now


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.

Upgrade now

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 Preparing CMS Web Graphics and Layouts Using Open Source Tools.

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 preferencesfrom the dropdown menu.

Continue to classic layout Stay on new layout
Welcome to the redesigned course page.

We’ve moved some things around, and now you can



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.

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.