- This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
- The forum ‘CSS’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Hey guys,
I’ve been having some trouble with my css code lately and I’m beginning to think I’m arranging it incorrectly. It’s primarily revolving around making the nav menu with css. What it’s doing is picking up properties from my normal page links.
So here is what I usually have:
css:
/* These are the Main Menu Links */
a.nav {
font-family: Georgia;
font-size: 18px;
font-weight: normal;
color: #fff;
text-decoration: none;
line-height:50px;
}
a.nav:hover {
font-family: Georgia;
font-size: 18px;
font-weight: normal;
color: #7a7a7a;
text-decoration: none;
}
And then I’m just adding it in the page code like this:
So am I just being inefficient and possibly do something like this:
#leftmenu ul, li {
}
#leftmenu a {
font-family:georgia;
font-size:20px;
}
#leftmenu a:hover {
border-bottom:1px solid #fff;
}
Or is there a different way altogether I should change my technique to?
The second way is how i would do it.
your telling the page: If the <a> tag appears in <div id="leftmenu"> act like this. Other wise act normal.
Looks good to me!