I'd like text to appear on the right side of a logo when the person moves the cursor over the logo. I checked out other similar questions and tried their solutions and it still doesn't work. When I hover over the logo, nothing appears. When I check the inspector, the browser doesn't seem to read the hover effect. Its still reading opacity:0
and visibility:hidden
.
.logo {
display: block;
width: 90px;
}
.puneet-name {
position: absolute;
visibility: hidden;
opacity: 0;
transition: opacity .2s, visibility .2s;
}
.logo img:hover .puneet-name {
visibility: visible;
opacity: 1;
}
.header_menu {
padding: 25px 0;
z-index: 12;
margin-right: 2px;
margin-left: 0.1px;
}
<div class="header_menu row d-flex align-items-center justify-content-between">
<a class="logo" href="#">
<img src="images/PS_logo.png" alt="logo"/>
</a>
<div class="hover-text lineHeading">Person Name</div>
</div>