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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T00:55:26+00:00 2026-05-20T00:55:26+00:00

I have the following html snippet: <a href=page1.aspx class=title>page title goes here</a><br /> <span

  • 0

I have the following html snippet:

<a href="page1.aspx" class="title">page title goes here</a><br />
<span class="username">username goes here: </span><span class="dateandtime">date the time go here</span>

Here is the css for these classes

.title
{
    color:#707070;
}

.username
{
    color:#8DAAB8;
}

.dateandtime
{
    color:#A5A7AC;
}

Is it possible to change the colors of these 3 items when hovering over the title?

The colors I want the items to change to are as follows

title = 000000
username = DF821B
dateandtime = 3185B6

Not sure if this is possible with css, if the html snippet structure needs to change, that will not be a problem.

I know this can be done with javascript, but wanted to know if it is possible without javascript.

  • 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-20T00:55:26+00:00Added an answer on May 20, 2026 at 12:55 am

    Not totally clear on the question — do you want each of them to have their own hover colour, or do you want all three to change colour at once, when you hover on any of them?

    In the first case, it’s easy: just add a :hover style for each of the three elements (you already have answers to this effect, so I won’t repeat them here).

    In the second case, you’ll need a container element that would take the hover, so your code would look like this:

    <span class='container'>
        <a href="page1.aspx" class="title">page title goes here</a><br />
        <span class="username">username goes here: </span><span class="dateandtime">date the time go here</span>
    </span>
    

    (you may want to use <div> rather than <span>, but I’ll leave that up to you)

    Your CSS would then look like this:

    .title {color:#707070;}
    .username {color:#8DAAB8;}
    .dateandtime {color:#A5A7AC;}
    
    .container:hover .title {color:#000000;}
    .container:hover .username {color:#DF821B;}
    .container:hover .dateandtime {color:#3185B6;}
    

    Obviously, change the colours in the new styles to whatever you want them to be. If all three should be the same, then you could simplify the three new styles down to something like this:

    .container:hover span, .container:hover a, {color:#000000;}
    

    Hope that helps.

    One final thing to note: IE6 and below do not support the :hover style on anything except <a> elements. My recommendation to you is simply not to support IE6 for your site (there are plenty of other things broken in IE6 too), but if you do need to support it, there are hacks available to get :hover to work with it. See Whatever:Hover.

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

Sidebar

Related Questions

I have the following HTML snippet: <span class=target>Change me <a class=changeme href=#>now</a></span> I'd like
I have the following HTML (a snippet): <td class=ms-vb-title height=100%> <table class=ms-unselectedtitle onmouseover=OnItem(this) ctxname=ctx1
I have the following snippet of a HTML select box: <select id=Obj_cboscreen class=menubarselect name=page>
I have the following html snippet <ul class=product> <li><span>Available:</span>123</li> <li><span>Code:</span>12345</li> </ul> What I'm looking
I have the following HTML snippet: <body> <div class=main> <div class=topBar> <p>testing</p> </div> <div
I have following html snippet: <div class=rsw-pp rsw-pp-widget> <div g:type=AverageStarRating g:secondaryurls=http://maps.google.com/?cid=12948004443906002997 g:decorateusingsecondary=http://maps.google.com/?cid=12948004443906002997 g:groups=maps g:rating_override=2.998000
Given the following HTML snippet: <div class=image> <div class=placeholder> <a class=load iframe href=https://contestapp.com/images/4><img src=/uploads/image/image_file/4/thumb_he_sport_nutrition_for_active_kids_photo.jpg?1307271623
I have the following snippet in one of my html pages : <div class=inputboximage>
I have following abc.aspx file: <%@ Page Language=vb AutoEventWireup=false Codefile=abc.aspx.vb Inherits=abc %> <html xmlns=http://www.w3.org/1999/xhtml>
I have the following snippet of the code: <html> <head> <title>Example of Very First

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.