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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T12:14:52+00:00 2026-05-12T12:14:52+00:00

I would like to be able to have hovering over the image invoke the

  • 0

I would like to be able to have hovering over the image invoke the hover property on the text link too that is next to it.

I have a image preview of a video and the video name written next to it as text string. I’d like to make it so i can hover on the picture and make the text still change color like a hover effect without having to make the image and text all one image , for obvious search and usability reasons; keeping text as text etc.

UPDATE: I also want to make sure the text link that is now in the “span” can not just move over using “margin-left” but can be raised up. By default in the code i have it just drops to the level of the bottom of the 60x60px image. I want it higher up so it looks nice but “margin-bottom” doesn’t help that. i want it in the “Center height” of the 60×60 img… not at the bottom of it where it goes by default.

ANy ideas? thanks!

p.s. I’m open to the java script and jquery ideas some posted here but i am a complete newbie at that and will need extra explanation. I prefer CSS.

my code now is:

my html is:

<div id="example">
  <a href="#">
    <img src="image/source_60x60px.jpg">
    <span class="video_text">Image Text</span>
  </a>
</div> 

my css is:

div#example         { float:left; width:358px; height:60px; margin-top:20px; }   
div#example a       { color:#B9B9B9; width:100%;}  
div#example a:hover { color:#67a; text-decoration:none;}  
span.videotext      { margin-left:80px;} 
  • 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-12T12:14:53+00:00Added an answer on May 12, 2026 at 12:14 pm

    You could do this with CSS, or with Javascript. Without knowing your markup, and how your elements are laid out, it’s not possible to determine which option is best.

    CSS Option

    a:hover span { color:red; }
    <a href="1.html">
      <img src="1.jpg" />
      <span>Title: One</span>
    </a>
    

    In that example, we have our text and image both within a link. We are then modifying the color of the text on the :hover event.

    Javascript (jQuery)

    div.hovered p { color:red; }
    
    <div class="preview">
      <img src="1.jpg" />
      <p>Title: One</p>
    </div>
    
    $("div.preview img").hover(
      function () { $(this).parent().addClass("hovered"); },
      function () { $(this).parent().removeClass("hovered"); }
    );
    

    This example showcases a solution that simply adds a class to the parent container, which in turn modifies the representation of the title. This event is controlled by hovering the image within the container.

    Update:

    Positioning your text isn’t that difficult. The quick-and-easy method would be to position the parent container with relative, and the text with absolute:

    <div class="container">
      <a href="#">
        <img src="1.jpg" />
        <span class="title">Hello World</span>
      </a>
    </div>
    
    div.container            { position:relative; width:150px; }
    div.container span.title { position:absolute; top:0; left:50px; width:100px; }
    

    That’s a quick example. You can modify the values to your needs.

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

Sidebar

Ask A Question

Stats

  • Questions 191k
  • Answers 191k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Validation just shows that you took time to ensure that… May 12, 2026 at 6:13 pm
  • Editorial Team
    Editorial Team added an answer You need to make your stack larger: http://thilinamb.wordpress.com/2008/12/22/how-to-increase-the-java-stack-size/ With larger… May 12, 2026 at 6:13 pm
  • Editorial Team
    Editorial Team added an answer There's better events than mouseup that make this kind of… May 12, 2026 at 6:13 pm

Related Questions

I am not able to use the breakpoint in Studio with Javascript. I'm able
I would like to be able to have a version number appended to a
I would like to be able to spawn a process in python and have
I have a JUnit 3.x TestCase which I would like to be able to

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.