Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6476131
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T06:47:15+00:00 2026-05-25T06:47:15+00:00

I am trying to style some links in my navbar. Since I am using

  • 0

I am trying to style some links in my navbar. Since I am using html5, I have placed the links within the standard <nav> and then a <ul> and then <li> tag. How would I style only the links within the <nav> <ul> <li> tags (I’m guessing with pseudo classes)?

I have thought of the following but to no avail:

nav ul li a:link, a:visited {}
nav a:link, a:visited {}

I know that I could be using classes and id’s but I wanted to know if I could do it without them since I will probably only have one <nav> tag in the whole page with an unordered list inside of it. If you could let me know if it is possible without using classes and id’s that would be great.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T06:47:16+00:00Added an answer on May 25, 2026 at 6:47 am

    http://jsfiddle.net/S9RG8/ Here’s a JS fiddle showing a working example of how to select all of the pseudo elements of an anchor within a ul within a nav tag.

    This should work for you, but if not you may want to include an HTML5 shiv in your header to ensure that the browser you’re working with supports HTML5 elements.
    code.google.com/p/html5shiv/

    Hope this helps

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to create a preferences window. In it I have some checkbox style
I'm trying to style some Drupal output. In particular, I'm trying to reference a
I am trying to style hyperlinks: some must be white, and some others must
I am trying to do some style-check/translation work for Java programs. First I would
I'm trying to style a TreeView using this example and everything was working fine
I'm trying to style a button using <input type=button> instead of just <button> .
I'm trying to style a select option list using CSS. I want more padding
I am trying to remove some inline style that are produced on some tables
For some reason that I've been trying to figure out, the links on my
I'm using Sinatra, and I've been trying to load in some stylesheets. I've tried

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.