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 8011121
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T18:56:12+00:00 2026-06-04T18:56:12+00:00

In the following example – Is it possible to retain the border on the

  • 0

In the following example – Is it possible to retain the border on the top level navigation when hovering on the sub elements? I would like to retain the black border on ‘About Us’ when hovering on its sub items. Example: http://jsfiddle.net/6zKRC/2/

HTML

<div class="navigation">
  <ul class="navigation fc">
   <li>
    <a href="/">Home</a>
   </li>
   <li class="">
    <a href="/about.aspx">About</a>
    <ul>
      <li>
        <a href="/about/sub-navigation-1.aspx">Sub Navigation 1</a>
      </li>
      <li>
        <a href="/about/sub-navigation-2.aspx">Sub Navigation 2</a>
      </li>
    </ul>
  </li>
 </ul>
</div>​

CSS

.navigation ul {
  font-family: Arial, Verdana;
  font-size: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.navigation ul li {
  display: block;
  position: relative;
  float: left;
}

.navigation li ul {
    display: none; 
}

.navigation ul li a {
  display: block;
  text-decoration: none;
  color: #000;
  font-weight:bold;
  padding: 5px 15px 5px 15px;
  white-space: nowrap;
}

.navigation ul li a:hover { 
  background: #CCC;
  color:black;
  border:solid 1px black;
  border-bottom:0;
}

.navigation li:hover ul {
  display: block;
  position: absolute;
  border:solid 1px black;
  border-top:0;
}

.navigation li:hover li {
  float: none;
  font-size: 11px;
}

.navigation li:hover a {
  background: #CCC; 
}

.navigation li:hover li a:hover {
  background: #CCC;
  border:0;
}

​

  • 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-04T18:56:14+00:00Added an answer on June 4, 2026 at 6:56 pm

    Hi i have made some changes in your css please check your updated css :-

    CSS

    .navigation ul {
      font-family: Arial, Verdana;
      font-size: 14px;
      margin: 0;
      padding: 0;
      list-style: none;
    }
    
    .navigation ul li {
      display: block;
      position: relative;
      float: left;
    }
    .navigation li ul {
        display: none; 
    }
    .navigation ul li a {
      display: block;
      text-decoration: none;
      color: #000;
      font-weight:bold;
      padding: 5px 15px 5px 15px;
      white-space: nowrap;
    }
    .navigation ul li:hover { 
      background: #CCC;
      color:black;
      border:solid 1px black;
      border-bottom:0;
    }
    .navigation li:hover ul {
      display: block;
      position: absolute;
      border:solid 1px black;
      border-top:0;
        left:-1px;
    } 
    .navigation li:hover ul li {
      float: none;
      font-size: 11px;
          background: #CCC; 
    
    }
    .navigation li:hover li:hover {
      background:#e6e6e6;
      border:0;
    }
    

    HTML

    <div class="navigation">
      <ul class="navigation fc">
       <li>
        <a href="/">Home</a>
       </li>
       <li class="">
        <a href="/about.aspx">About</a>
        <ul>
          <li>
            <a href="/about/sub-navigation-1.aspx">Sub Navigation 1</a>
          </li>
          <li>
            <a href="/about/sub-navigation-2.aspx">Sub Navigation 2</a>
          </li>
        </ul>
      </li>
     </ul>
    </div>​
    

    I hope you looking this one:- http://jsbin.com/uwemuy/5/edit

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

Sidebar

Related Questions

The following example is a very simplified version of my top navigation. http://jsfiddle.net/AEqxT/ If
I have the following example, compiled in VS2005, warning level 4: int main(int argc,
The following example code compiles under gcc and works as I would hope. It
In following example, I'd like the default value for $usergroup to be 1. Obviously,
I have the following (example.txt) file: blue(4) red(8) green(5) yellow(19) brown(60) black(5) how can
The following example will not compile for me: #include <iostream> #include <functional> #include <string>
Example: Suppose in the following example I want to match strings that do not
Given the following example (using JUnit with Hamcrest matchers): Map<String, Class<? extends Serializable>> expected
Take the following example, I have a class public class SomeItem { public string
In the following example i can create an object dynamically via a string; however,

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.