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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T11:56:10+00:00 2026-05-25T11:56:10+00:00

I have a container div that lights up when you hover over it. It

  • 0

I have a container div that lights up when you hover over it. It also changes the text effect as well. However, the text effect is only changed if the child div where this text is does not have a text effect itself. Can I somehow overwrite this text effect when the div is hovered, and then return it back when the mouse leaves? Thanks :))))

(Trying to overwrite the text shadow effect in the .text div.)

.maindiv2:hover
{
text-decoration: none;
    text-shadow: -1px -1px 0 rgba(0,0,0,0.3);
    color: #fff;
    background-color: #3C8DDE;
    background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#599bdc), to(#3072b3));
    background-image: -moz-linear-gradient(#599bdc, #3072b3);
    background-image: -o-linear-gradient(#599bdc, #3072b3);
    background-image: linear-gradient(#599bdc, #3072b3);
cursor:pointer;
onclick="SomeJavaScriptCode";
}
.text {
    font-family: Arial, Helvetica, sans-serif;
    text-shadow:#ffffff 0px 0.05em  0px;
    font-size: 0.875em;
    font-weight: normal;
    float: left;
    width: 275px;
    text-align: right;
    padding-top: 10px;
    padding-right: 10px;
}

JsFiddle with two divs showing one working and the other not 🙂

  • 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-25T11:56:11+00:00Added an answer on May 25, 2026 at 11:56 am

    I believe

    .maindiv2:hover .text
    {
        /* whatnot */
    }
    

    is an option, but it is not cross browser.

    So in your situation you need this:

    .maindiv:hover .text
    {
        text-shadow: -1px -1px 0 rgba(0,0,0,0.3);
    }
    

    just before the .text csss

    Working Demo

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

Sidebar

Related Questions

In Theory I have a div (container) that when hovered over one of its
I have a container div that holds two internal divs; both should take 100%
I have an animation on a partially hidden div container that will execute when
i have a div that i use as a container to fit in footer
I have a jQuery draggable container div with a side scroll bar that should
I have a pretty standard css layout where I use a container div that
I have a DIV container that is a CSS class defined on the top
I have a container div that has the height of my body which is
i have a requirement in which i have a container div that contains 3
I have a page with a container div that holds three additional divs as

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.