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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T00:32:03+00:00 2026-06-16T00:32:03+00:00

My question is one that I was sure would be a common one, but

  • 0

My question is one that I was sure would be a common one, but to the best of my efforts, I cannot find any tutorials about this at all.

I am looking to build a text & image navigation menu for a website. It seems to me that many people would want to do something like this, but either I am totally missing a simple concept or many people aren’t looking to do something like this.

My Exact Goal: Create a navigation menu with pictures on top and CSS styled text on the bottom. When you focus or hover over the picture, the image changes AND the text changes as if they were one item.

My Problem: On my button, if you hover over the text, the image and text change. If you hover over the image, ONLY THE IMAGE changes as if they are two separate entities.

My HTML:

    <!DOCTYPE HTML>
    <html>
    <head>

      <meta http-equiv="X-UA-Compatible" content="IE=edge" />
      <meta charset="UTF-8" />

      <link rel="stylesheet" type="text/css" href="test2.css" />

    </head>

    <body>


        <ul>
        <li id="onlineRugStore"><a href="#"id="test"><b>Button</b></a></li> 
        </ul>  

​

The CSS:

    body{
    background-color:#e8f1c4;  
    }

    #onlineRugStore a{
    display:block;
    width:191px;
    height:107px;
    background:url('bestimages/test/worktest.gif') 0 0;
    }

    #onlineRugStore a:hover{
    background:url('bestimages/test/worktest.gif') 0 -107px;
    }

    #test b{
    position:absolute;
    text-align:center;
    margin:110px 0 0 0;
    font-size:18px;
    color:white;
    text-decoration:none;
    border-bottom-left-radius:15px;
    border-bottom-right-radius:15px;
    width:191px;
    height:24px;
    background-color:#cc7bd6;
    opacity:0.45;
    filter:alpha(opacity=45);
    padding:4px 0 0 0;
    }

    #test b:hover{
    opacity:1.0;
    }

    ul{
    list-style-type:none;
    }

An example of what I am talking about can be viewed at: http://kokorugs.com/test2.php

After exhausting all efforts, I thought that this may be impossible, and then I found a working example on the following website: http://www.amazeelabs.com/en (notice the navigation menu).

I appreciate any and all help.

Happy Holidays,
Raphael

  • 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-16T00:32:04+00:00Added an answer on June 16, 2026 at 12:32 am

    I’ve created a JSfiddle for you: http://jsfiddle.net/drXng/

    The code you see in the CSS should explain clearly what is going on.

    /*CSS you want to apply to the element wrapping both the text and picture*/
    .both {
     opacity: 0.5;
    width: 200px;
    height: 200px;
    display: block;
    }
    
    /*CSS you want to apply to the text only before it is hovered*/
    .text {
    background-color: green;
    }
    
    /*CSS you want to apply to the picture only before it is hovered*/
    .picture {
      width: 50px;
      height: 50px;
    }
    
    /*CSS you want to apply to the element wrapping both both the text and picture after hovered*/
    .both:hover {
    opacity: 1;
    }
    
    /*CSS you want to apply to text when both are hovered*/
    .both:hover .text {
      background-color: blue;
    }
    
    /*CSS you want to apply to picture when both are hovered*/
    .both:hover .picture {
    background-color: red;
    }​
    

    In your case, it could be easily done by changing .both to ul. For example, the following css will change #test b‘s opacity as long as anything inside ul is hovered.

    ul:hover #test b{
    opacity:1.0;
    }
    

    P.S. as a word of advice, try to avoid using ID selectors in CSS if you can. 🙂

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

Sidebar

Related Questions

I am sure this is an easy question, but one that has escaped me
This may seem a trivial question, but it's one that's bothered me a lot
I'm pretty sure that this is the right site for this question, but feel
This is quite a simple question - although one that is on my mind
Weird question, but one that puzzles me a bit. In the old days when
My question is an extension of that one: Immutable numpy array? This code prints
One question about protected constructor. I learnt that the protected constructor can be used
(For the purposes of this question, let us assume that one is intentionally not
I'm sure this is a common query but I'm not certain how to phrase
I'm pretty sure that this question already has been answered somewhere. It just seems

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.