Unable to get CSS hover effect to overlay

Can anyone help me figure out why the .cd-img-overlay class is not functioning properly when I hover over a list item?

Check out my live code here

CSS:

#cd-team .cd-img-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(92, 75, 81, 0.9);
    opacity: 0;
    border-radius: .25em .25em 0 0;
    -webkit-transition: opacity 0.3s;
    -moz-transition: opacity 0.3s;
    transition: opacity 0.3s;
}

HTML:

<li>
    <a href="#0" data-type="member-1">
        <figure>
            <img src="images/bruce.jpg" alt="Team member 1" />
            <div class="cd-img-overlay"><span>View Bio</span></div>
        </figure>
        <div class="cd-member-info">
            John Smith <span>Founder &amp; President</span>
        </div>
    </a>
</li>

I'm struggling to get the overlay class to function as shown in this tutorial's demo when hovering over a team member:

Answer №1

Hey, all you need to do is adjust the overlay opacity to 1 and you'll be good to go! Right now, your hover class has it set to opacity: 0.

Answer №2

Is there a hover effect that alters the opacity to 1? Like this:

a:hover .image-overlay { opacity: 1; }

Answer №3

Simply include this snippet in your code and it should resolve the issue. The problem lies in not adjusting the opacity to 1 on hover.

#cd-team li:hover .cd-img-overlay {
    opacity: 1;
}

Answer №4

The issue lies in not setting the opacity to 1 upon hovering. To resolve this, utilize the code snippet provided below from the functional URL:

.no-touch #cd-team li:hover .cd-img-overlay { opacity: 1; }

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

When hovering over the JQuery drop-down menu, the menu will automatically close

While navigating the site , I noticed that when hovering over the menu everything seems to be working fine. But as soon as I attempt to access the submenu links or children, the menu unexpectedly closes. This issue may be related to having a transparent ba ...

Experience the sleek and intuitive Material Design Lite navigation drawer, inspired by the likes of Google Android

Currently, I am incorporating Material design lite into my website and have found many templates that work well. However, I am looking to make a slight design modification to the navigation drawer. Here is the dashboard template I am currently utilizing: ...

Discovering the bootstrap of a specific segment: A step-by-step guide

I encountered an issue when trying to paste a menu from one responsive HTML template to another. While both templates are designed to be responsive, the menu alignment gets distorted when viewed on mobile devices. I am unsure of how to extract only the bo ...

What is the process for disabling the CSS module feature in Next.js?

In Next.js, Global CSS can only be imported in _App.js. However, importing global CSS in every component is not allowed, so we have to use CSS modules to comply with this restriction imposed by Next.js. Currently, I am in the process of migrating a large ...

What might be the root of this layout problem?

After creating the maximum of 5 entries, the layout appears as intended and looks like this: However, when there are fewer entries, the layout becomes disorganized: What could be causing this issue? The PHP code responsible for generating each entry is a ...

Dynamically update CSS class properties with another

I have incorporated a bootstrap CSS tooltip class that is defined as follows: .tooltip{display:none;color:#000;text-align:left;} .tooltip.in{opacity:0.9;z-index:1030;height:auto;display:block} .tooltip.top{margin-top:-10px;text-align:center} ...

Prevent anchor jumping caused by popstate event in Safari

This situation is really testing my patience. When navigating within the same page using anchors, the browser automatically takes you back/forward to the location of that link in your history when popstate is triggered. One might think that you could prev ...

Activate the Chrome Extension that allows you to open a link in a new tab with just a middle click or regular click, without closing the popup

When I try to click a link in my extension popup and open it in a new tab using "middle click -> open link in a new tab", the popup closes. Is there a way to keep the popup open so I can click on multiple links from my extension without interruption? A ...

Attempting to adjust table size in MPDF to fill the available height

I'm currently utilizing MPDF in order to create a PDF document from an HTML page that includes a table. My goal is to have the table expand to fill up the remaining space on the page. Here is the specific table I am working with: I want the final el ...

The middle alignment of a Bootstrap 4 row is off

I've been struggling to center the content within the <div class="col-md-2 col-lg-2">, but so far I haven't had any success. I understand that setting the columns to a size of 2 doesn't fill the 12-column grid system, but I really wan ...

Execute Cheerio selector once the page has finished loading

Hey there! I'm trying to extract the URL value of an iframe on this website: I've checked the view page source but couldn't find the iframe. Looks like it's loaded after the page is fully loaded through JavaScript. Could it be that ...

Is it acceptable to nest an HTML document within the <body> tag of another HTML document?

Is it acceptable to nest an HTML document within the body tag of another HTML document? I am considering this approach in order to execute a JavaScript function on body load. Due to the dynamic generation of the main HTML code by a controller (Yii), I ...

Information regarding Django and managing static files during deployment through pythonanywhere

Is there a way for me to run collectstatic again in PythonAnywhere? I ran it after removing a line from my remote repository, but the new styles don't seem to be applying. Any suggestions on what I can do? English is not my first language. ...

How can HTML and CSS be linked to display images independently?

Check out this code: body{ background-image:url('http://wallpoper.com/images/00/31/33/51/black-background_00313351.jpg'); } div.header{ background-color:#F0F8FF; text-align:center; padding:3px; ...

Unusual CSS behavior discovered while implementing horizontal scrolling navbar with overflow-x

I've been working on a navbar that will scroll horizontally when it exceeds the width of its parent container. It features a bottom border with a different color for the active link. Using a negative margin to overlap them works well, but as soon as ...

What is the technique for filtering multiple values using the OR operation in ng-model functions?

Currently, I am using an ng-modal labeled as "myQuery." At the moment, there are two filters in place that look like this: <accordion-group heading="" ng-repeat="hungry_pets in Pets" | filter:{hungry:false} | filter:{name:myQuery}" ... > I have ...

Problems encountered when applying box-shadow for text background across multiple lines

Lately, I've become accustomed to using box-shadow to add backgrounds to text headings. I've been employing a little trick of applying a box-shadow to a span element within h1 tags in order to create a unique "background with padding" highlight e ...

Capture a screenshot of the icons

I'm curious about displaying specific parts of images in a React Native application. class InstaClone extends Component { render() { return( <View style={{ flex:1, width:100 + "%", height:100 + "%" }}> <View style={st ...

Issues with Implementing Custom CSS Styles in ag-grid

It seems like a simple customization, but the documentation on it is quite limited. I'm trying to change the line-height of one of my tables so that text doesn't double-space when wrapping. Here's the CSS code from Test.module.css: .ag-them ...

Is it possible to include two of these on a single page with unique variables? (Using JQuery)

I am looking to create two similar pages, each with different percentages. However, when I try modifying the JS or changing class/ID names, it keeps pulling data from the first SPAN element. http://jsfiddle.net/K62Ra/ <div class="container"> <di ...