• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Need to target just those images that are links

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › Need to target just those images that are links

This topic is: not resolved

Tagged: hover, images, link

  • This topic has 2 replies, 1 voice, and was last updated 6 years, 5 months ago by Angelique.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • October 1, 2016 at 6:54 pm #194082
    Angelique
    Member

    I have the Modern Studio Pro theme.

    On the front page of my website, there are four rows of images. I want a hover effect on the images that are links. I can't seem to isolate the right class for that.

    Currently I have been able to give an effect to ALL of the images in the rows by using this code:

    .column-row img:hover {
    	border: 6px ridge #fbdd75;
    }

    How can I target JUST those images that are links? For the purpose of testing, the second image in the first row, the one that says "single location," is a link. The rest are not.

    Note: The code above is not in my main style sheet. It's in a sheet called front-page.css.

    http://itsolutionsbycmit.com
    October 1, 2016 at 9:23 pm #194119
    Angelique
    Member

    Just wanted to say there's been one minor change to my code: Outline instead of Border (it stops the graphics from shrinking when hovered over.)

    .column-row img:hover {
    	outline: 6px ridge #fbdd75;
    }
    October 1, 2016 at 11:33 pm #194120
    Angelique
    Member

    Well, I figured out the answer. I can't remove my post, so I may as well share the answer in case anyone else needs to know it. All you have to do is create a new class. I named mine "highlight."

    CSS:

    .highlight {
    	display:block;
    }
    
    .highlight:hover {
    	outline: 6px ridge #fbdd75;
    }

    HTML:

    <a class="highlight" href="http://theaddress.com"></a>

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2023 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble