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

  • Home
  • SEARCH
  • 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 8343143
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T05:58:09+00:00 2026-06-09T05:58:09+00:00

So I basically want to take a navigation i created with div’s and make

  • 0

So I basically want to take a navigation i created with div’s and make it so that each line (id) will rollover a different color.

I’ve tried a ton of different ways of doing it and I’m getting stuck with using the ID correctly I believe.

<div class="navcontainer">
        <div id="1"><a href="#">home</a></div>
        <div id="2"><a href="#">work</a></div>
        <div id="3"><a href="#">resume</a></div>
        <div id="4"><a href="#">about</a></div>
        <div id="5"><a href="#">links</a></div>
</div>

And the CSS

.navcontainer {
font-family: Arial, Helvetica, sans-serif;
font-size:24px;
display:block;
}
.navcontainer div a {
background-color:black;
margin:2px;
padding:2px;
display:inline;
float:left;
clear:both;
color:white;
text-decoration:none
}
.navcontainer #1 a:hover {
color:black;
background-color:red;
}
.navcontainer #2 a:hover {
color:black;
background-color:orange;
}
  • 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-06-09T05:58:11+00:00Added an answer on June 9, 2026 at 5:58 am

    Never start ID & Class with numerical (1,2,3,) digit. Write like this:

    #nav1,#nav2...
    

    HTML

    <div class="navcontainer">
            <div id="nav1"><a href="#">home</a></div>
            <div id="nav2"><a href="#">work</a></div>
            <div id="nav3"><a href="#">resume</a></div>
            <div id="nav4"><a href="#">about</a></div>
            <div id="nav5"><a href="#">links</a></div>
    </div>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a partial view that I want to basically take care of itself
Basically I want to take the following: And make it match the styling of
Basically I want to take an image that the user chooses from their photo
I basically want to take an existing mysql database structure created and used by
I basically want to make things easier by just looping LinkButtons instead of making
I basically want to open a browser window from Word using VBA that does
I'm pretty stuck here for what to do. I basically want to take all
I basically just want to take a 8 character ASCII value 003fc000 and convert
I basically want to take two images taken from the camera on the iPhone
Basically I want to take something like: textheretextheretexthere <table> <tr><td>heres some stuff</td><td>and some morestuff</td></tr>

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.