Styling Two Navigation Bars

77 views Asked by At

This is my first post. I have only been studying HTML/CSS for less than a week and could use some advice! I have a navigation bar that is the same across all pages. I want to add a second navigation bar to "hdm_menu.html". I have done so successfully. HOWEVER, I want to style the second menu bar differently. The first AND second is currently styled with the same tag in a css file. Do I need to create a second .css? Do I need to add in an id or class to each tag in the second toolbar? Or is there another way to accomplish this?

CSS

a:link, a:visited {
font-size: 1.5em;
font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
color: #000000;
letter-spacing: -0.09em;
text-decoration: none;
}

a:active, a:hover {
font-size: 1.5em;
font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
text-decoration: underline;
letter-spacing: -0.09em;
color: #FF0000;
}
1

There are 1 answers

0
Benyamin Noori On

You certainly don't need to create another .css file.

You can use both tags and classes that identify the second nav bar in your existing .css file. If you have other elements that use the same style, it's better to use classes, otherwise using an id will work fine.