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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T03:15:19+00:00 2026-05-31T03:15:19+00:00

I am working with some CSS for a small menu idea I have. I

  • 0

I am working with some CSS for a small menu idea I have.

I am hoping that when ready, I can hover over the link ‘Test 1’ and the Test 1 content displays in the #content div. And if you hover over ‘Test 2’ link then Test 2 content appears.

I was also hoping if it’s possible that when I move the cursor over to the #content div (from a link) that it will maintain the content in that area for that link.

Is this possible?

Many thanks for any helpers with this.

Here is my basic HTML:
http://jsfiddle.net/PjHnM/1/


UPDATE

I have an example I found here:
http://jsfiddle.net/88nKd/
but I’m still unsure how to maintain state when I hover into the content part.


<!DOCTYPE html>
<html><head><meta charset="utf-8" />
<title>Divs</title>
<style type="text/css">
* {margin:0;padding:0}
#main {height:100px;width:400px;float:left;background:#eee;}
#main ul {height:100px;float:left;background:#999}
#main ul li a {width:100px;display:block;background:#333;color:#fff}
#main ul li a:hover {background:#777}
#content {height:100px;}
#content div {float:left}
</style>
</head>
<body>

<div id="main">
    <ul>
        <li><a href="">Test 1</a></li>
        <li><a href="">Test 2</a></li>
    </ul>
    <div id="content">
        <div style="display:none">Test 1 Content</div>
        <div style="display:none">Test 2 Content</div>
    </div>
</div>

</body>

</html>
  • 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-31T03:15:20+00:00Added an answer on May 31, 2026 at 3:15 am
    <!DOCTYPE html>
    <html><head><meta charset="utf-8" />
    <title>Divs</title>
    <style type="text/css">
    * {margin:0;padding:0}
    #main {height:100px;width:400px;float:left;background:#eee;}
    #main ul {height:100px;float:left;background:#999}
    #main ul li a {width:100px;display:block;background:#333;color:#fff}
    #main ul li a:hover {background:#777}
    #content {height:100px;}
    #content div {height:100px;}
    </style>
     <script type="text/javascript" src="jquery.js"></script>
    <script>
    $(function(){
    $("#test1").mouseenter(function(){$("#content1").show();}).mouseleave(function(){$("#content1").hide();});
    $("#test2").mouseenter(function(){$("#content2").show();}).mouseleave(function(){$("#content2").hide();});
    
    $("#content1").mouseenter(function(){$("#content1").show();}).mouseleave(function(){$("#content1").hide();});
    $("#content2").mouseenter(function(){$("#content2").show();}).mouseleave(function(){$("#content2").hide();});
    });
    </script>
    </head>
    <body>
    
    <div id="main">
        <ul>
            <li><a href="javascript:void;" id="test1">Test 1</a></li>
            <li><a href="javascript:void;" id="test2">Test 2</a></li>
        </ul>
        <div id="content">
            <div style="display:none" id="content1">Test 1 Content</div>
            <div style="display:none" id="content2">Test 2 Content</div>
        </div>
    </div>
    
    </body>
    
    </html>
    

    ** UPDATED **
    Is this what did you mean?

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

Sidebar

Related Questions

I am working on a Drupal 6 site that some CSS issues. I have
I have a UI problem with some CSS that I was hoping to get
I am working with some CSS that is poorly written to say the least.
I have been working on some legacy C++ code that uses variable length structures
I've got some CSS and HTML that I'm working on, I wanted to sub
I am working on my website and I need to make some css that
I have a small chunk of code I can't seem to get working. I
I am working with some css animation. But I found that, the CSS transition
i'm working in an application i have to change some css files in the
I'm working on games using javascript some html and css, and I was wondering

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.