- This topic has 5 replies, 2 voices, and was last updated 5 years, 6 months ago by
David.
-
AuthorPosts
-
October 24, 2020 at 4:45 am #1502172
NBC
I’ve built a grid of client logos that runs four columns wide by four rows deep. Here’s an example of one row:
<div class="grid-25 tablet-grid-25 mobile-grid-100 first-column"> <img src="[LINK TO LOGO FILE]" alt="[ALT TEXT]" style="width="400" class="logo"></a> </div> <div class="grid-25 tablet-grid-25 mobile-grid-100 second-column"> <img src="[LINK TO LOGO FILE]" alt="[ALT TEXT]" style="width="400" class="logo"></a> </div> <div class="grid-25 tablet-grid-25 mobile-grid-100 third-column"> <img src="[LINK TO LOGO FILE]" alt="[ALT TEXT]" style="width="400" class="logo"></a> </div> <div class="grid-25 tablet-grid-25 mobile-grid-100 fourth-column"> <img src="[LINK TO LOGO FILE]" alt="[ALT TEXT]" style="width="400" class="logo"></a> </div>The class “logo” applies CSS to make the image appear in grayscale unless your cursor hovers over it:
img.logo { margin: 15px; -webkit-filter: grayscale(100%) !important; filter: grayscale(100%) !important; } img.logo:hover { -webkit-filter: grayscale(0) !important; filter: grayscale(0) !important; }When I first built this page, none of the client sites were built so I did not treat the logos as links to the respective client sites. I’m gradually making headway with that and wanted to start adding the links.
When I treat the logos as links, however, the “logo” class no longer applies. The images just appear in color.
Is there any way to preserve the “logo” class hover effect and still make these images serve as links?
October 24, 2020 at 5:29 am #1502227David
StaffCustomer SupportHi there,
can you add a link to one of the images so we can take a look?
October 24, 2020 at 11:02 am #1502673NBC
I put the link, and temporary log-in credentials, in the “Private information” area. I’ll add it again.
Note that I have deleted the links from the images at present because they interfere with the grayscale effect.
October 25, 2020 at 5:23 am #1503213David
StaffCustomer SupportAre you able to put a link on one of the images ? So i can see what CSS is required
October 25, 2020 at 9:51 am #1503709NBC
Tried it again, and this time, it’s working.
In the immortal words of the late Gilda Radner, “Never mind.”
October 25, 2020 at 2:39 pm #1503911David
StaffCustomer SupportHaha – glad to hear you got it working 🙂
-
AuthorPosts
- You must be logged in to reply to this topic.