Jump to content

Need fast help with links..


Recommended Posts

I have setup a horizontal nav. at the top of the page. I like how it's styled. However, now it applies to all my links. Here's my question (and keep in mind, I'm a novice), how do I style the links in my main content div and my footer div to be different without screwing up the header / top nav links. here's the code I have: #header a:link,a:visited{color:#FFF;text-decoration:none;font-family: Georgia, "Times New Roman", Times, serif;font-size: 16px;font-style: oblique;text-align: center;vertical-align: middle;padding-top: 10px;padding-right: 10px;padding-bottom: 10px;font-weight: normal;}#header a:hover,a:active{background-color:#9DDBD1;color: #7A7A7A;font-family: Georgia, "Times New Roman", Times, serif;text-align: center;vertical-align: middle;font-size: 16px;font-weight: normal;}

Link to post
Share on other sites

I'm guessing you're seeing the main/footer links get styled when they're visited or active. This is because your selectors are just a little bit off. They should look like this: #header a:link, #header a:visited...#header a:hover, #header a:active... You need to include the #header selector every time. Think of the comma as separating a list of selectors. When you write:#header a:link, a:visitedyou are actually telling it to select all a:link elements within #header and all a:visited elements on the page.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...