Skip to content
  • Recent
  • Tags
  • Popular
  • Users
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse

Lay Theme Forum

  1. Home
  2. General Discussion
  3. image hover add-on sizes

image hover add-on sizes

Scheduled Pinned Locked Moved General Discussion
2 Posts 2 Posters 78 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    tali
    wrote on last edited by
    #1

    Hello!

    I want to set a different size for each time I use ImageHoverAddon.

    So that in the first section, when hovering on text, the image has full width, and that on the second section, the image is just small..

    Is this possible? :)

    Thank you!

    1 Reply Last reply
    0
    • RichardR Offline
      RichardR Offline
      Richard
      Global Moderator
      wrote on last edited by Richard
      #2

      Dear @tali

      This would be possible with Custom CSS, targeting the Imagehover region and the images that sit inside it:
      Screen Shot 2022-05-20 at 12.42.29 PM.png

      https://laytheme.com/documentation/custom-css-styling.html

      The lay-Imagehover-region is the parent container and the children images are called lay-image-responsive

      The images order in the container should match the order the links appear on the page.
      Because all the images sit in the same parent container and do not share different classes i would use the nth-child selector:

      https://www.w3schools.com/cssref/sel_nth-child.asp

      If you have 4 images in the first section and 5 in the second section then you know to target the last 5 and apply your 'small image' css.

      The following code is saying

      • within the imagehover region (.lay-imagehover-region)
      • target all images from the 5th:
      .lay-imagehover-region img.lay-image-responsive:nth-child(n+5) {
          // insert desired CSS here
      }
      

      hope this helps Tali & best wishes šŸŒ
      Richard
      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      I also code custom websites or custom Lay features.
      šŸ’æ Email me here: šŸ’æ
      info@laytheme.com

      Before you post:
      1. When using a WordPress Cache plugin, disable it or clear your cache.
      2. Update Lay Theme and all Lay Theme Addons
      3. Disable all Plugins
      4. Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code", click "Save Changes"

      This often solves issues you might run into

      When you post:
      1. Post a link to where the problem is
      2. Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
      3. If the problem is difficult to explain, post screenshots / link to a video to explain it
      Online Users
      Forgot your key, lost your files, need a previous Lay Theme or Addon version? Go to www.laykeymanager.com
      laytheme.com
      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Recent
      • Tags
      • Popular
      • Users
      • Search