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. Hover on simple Images

Hover on simple Images

Scheduled Pinned Locked Moved General Discussion
37 Posts 10 Posters 5.3k 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.
  • M Offline
    M Offline
    mathias
    wrote on last edited by
    #4

    www.mathiaskutt.com

    1 Reply Last reply
    0
    • arminunruhA Offline
      arminunruhA Offline
      arminunruh
      Global Moderator
      wrote on last edited by
      #5

      Try this:

      .img .caption{
          position: absolute;
          top: 50%;
          left: 50%;
          transform: translate(-50%, -50%);
      }
      
      1 Reply Last reply
      0
      • M Offline
        M Offline
        mathias
        wrote on last edited by
        #6

        YES!
        GREAT!

        1 Reply Last reply
        0
        • D Offline
          D Offline
          dellmerca
          wrote on last edited by
          #7

          Try this simple....Image Hover Sample

          Dell

          1 Reply Last reply
          1
          • arminunruhA arminunruh

            hey, you can do this with custom css!

            .img img{
            transition: all 300ms ease;
            }
            
            .img:hover img{
            filter: brightness(0.9);
            }
            
            .img .caption{
            opacity: 0;
            transition: opacity 300ms ease;
            }
            
            .img:hover .caption{
            opacity: 1;
            }
            

            Css is not so hard to do! There are little video courses about it like the one I recommend on khan university in the documentation section "custom css"

            O Offline
            O Offline
            Organstudio
            wrote on last edited by
            #8

            @arminunruh said in Hover on simple Images:

            hey, you can do this with custom css!

            .img img{
            transition: all 300ms ease;
            }
            
            .img:hover img{
            filter: brightness(0.9);
            }
            
            .img .caption{
            opacity: 0;
            transition: opacity 300ms ease;
            }
            
            .img:hover .caption{
            opacity: 1;
            }
            

            Css is not so hard to do! There are little video courses about it like the one I recommend on khan university in the documentation section "custom css"

            Hi Armin,

            Is there a way to modify this CSS so that it only applies to the images on a page that contain links (rather than all images)?

            Thanks!
            Norman

            1 Reply Last reply
            0
            • mariusjopenM Offline
              mariusjopenM Offline
              mariusjopen
              Global Moderator
              wrote on last edited by
              #9

              Dear @Organstudio

              that should work:

              .img a img{
              transition: all 300ms ease;
              }
              
              .img:hover a img{
              filter: brightness(0.9);
              }
              
              .img a .caption{
              opacity: 0;
              transition: opacity 300ms ease;
              }
              
              .img:hover a .caption{
              opacity: 1;
              }
              
              

              Let me know!

              Marius

              www.mariusjopen.world

              O 1 Reply Last reply
              1
              • mariusjopenM mariusjopen

                Dear @Organstudio

                that should work:

                .img a img{
                transition: all 300ms ease;
                }
                
                .img:hover a img{
                filter: brightness(0.9);
                }
                
                .img a .caption{
                opacity: 0;
                transition: opacity 300ms ease;
                }
                
                .img:hover a .caption{
                opacity: 1;
                }
                
                

                Let me know!

                Marius

                O Offline
                O Offline
                Organstudio
                wrote on last edited by
                #10

                @mariusjopen said in Hover on simple Images:

                .img a img{
                transition: all 300ms ease;
                }

                .img:hover a img{
                filter: brightness(0.9);
                }

                .img a .caption{
                opacity: 0;
                transition: opacity 300ms ease;
                }

                .img:hover a .caption{
                opacity: 1;
                }

                Thanks Marius โ€“ works perfectly!

                1 Reply Last reply
                0
                • mariusjopenM Offline
                  mariusjopenM Offline
                  mariusjopen
                  Global Moderator
                  wrote on last edited by
                  #11

                  Glad to hear!

                  www.mariusjopen.world

                  1 Reply Last reply
                  0
                  • S Offline
                    S Offline
                    Subliner
                    wrote on last edited by
                    #12

                    @arminunruh said in Hover on simple Images:

                    .img img{
                    transition: all 300ms ease;
                    }

                    .img:hover img{
                    filter: brightness(0.9);
                    }

                    .img .caption{
                    opacity: 0;
                    transition: opacity 300ms ease;
                    }

                    .img:hover .caption{
                    opacity: 1;
                    }

                    Hello Armin

                    This post is just what I am looking for, but there is something that I am not doing in the right way. I add the code to my Custom CSS and something is working because when I put the mouse over I can see the darkening of the image but I can not see the caption. Tha code that I put is:

                    .img img{
                    transition: all 300ms ease;
                    }
                    
                    .img:hover img{
                    filter: brightness(0.9);
                    }
                    
                    .img .caption{
                        position: absolute;
                        top: 50%;
                        left: 50%;
                        transform: translate(-50%, -50%);
                    }
                    
                    .img:hover .caption{
                    opacity: 1;
                    }
                    

                    The only thing that I need is to see the caption over the image at the center of the photo that is not a project thumbail. This one, for example is in a Category and inside a project too. The darkening works in every situation but I can not see the caption.

                    Thanks!

                    1 Reply Last reply
                    0
                    • mariusjopenM Offline
                      mariusjopenM Offline
                      mariusjopen
                      Global Moderator
                      wrote on last edited by
                      #13

                      Dear @Subliner
                      can you post a link to your website?

                      Thank you :-D

                      Marius

                      www.mariusjopen.world

                      S 1 Reply Last reply
                      0
                      • mariusjopenM mariusjopen

                        Dear @Subliner
                        can you post a link to your website?

                        Thank you :-D

                        Marius

                        S Offline
                        S Offline
                        Subliner
                        wrote on last edited by
                        #14
                        This post is deleted!
                        1 Reply Last reply
                        0
                        • mariusjopenM Offline
                          mariusjopenM Offline
                          mariusjopen
                          Global Moderator
                          wrote on last edited by
                          #15

                          Dear @Subliner
                          can you tell we which image you want to have the effect applied to and which piece of text you want to appear in it?

                          Best!

                          Marius

                          www.mariusjopen.world

                          S 1 Reply Last reply
                          0
                          • S Offline
                            S Offline
                            Subliner
                            wrote on last edited by Subliner
                            #16
                            This post is deleted!
                            1 Reply Last reply
                            0
                            • mariusjopenM Offline
                              mariusjopenM Offline
                              mariusjopen
                              Global Moderator
                              wrote on last edited by
                              #17

                              Dear @mathias
                              can you add a caption that I can see where the problem with the code is?

                              Best!

                              Marius

                              www.mariusjopen.world

                              1 Reply Last reply
                              0
                              • mariusjopenM mariusjopen

                                Dear @Subliner
                                can you tell we which image you want to have the effect applied to and which piece of text you want to appear in it?

                                Best!

                                Marius

                                S Offline
                                S Offline
                                Subliner
                                wrote on last edited by
                                #18
                                This post is deleted!
                                1 Reply Last reply
                                0
                                • mariusjopenM Offline
                                  mariusjopenM Offline
                                  mariusjopen
                                  Global Moderator
                                  wrote on last edited by
                                  #19

                                  Dear @mathias
                                  but you added a caption for the image?
                                  You need to add the caption by selecting an image and then click on edit caption.

                                  Best!

                                  Marius

                                  www.mariusjopen.world

                                  S C 2 Replies Last reply
                                  0
                                  • mariusjopenM mariusjopen

                                    Dear @mathias
                                    but you added a caption for the image?
                                    You need to add the caption by selecting an image and then click on edit caption.

                                    Best!

                                    Marius

                                    S Offline
                                    S Offline
                                    Subliner
                                    wrote on last edited by
                                    #20
                                    This post is deleted!
                                    1 Reply Last reply
                                    0
                                    • arminunruhA arminunruh

                                      hey, you can do this with custom css!

                                      .img img{
                                      transition: all 300ms ease;
                                      }
                                      
                                      .img:hover img{
                                      filter: brightness(0.9);
                                      }
                                      
                                      .img .caption{
                                      opacity: 0;
                                      transition: opacity 300ms ease;
                                      }
                                      
                                      .img:hover .caption{
                                      opacity: 1;
                                      }
                                      

                                      Css is not so hard to do! There are little video courses about it like the one I recommend on khan university in the documentation section "custom css"

                                      S Offline
                                      S Offline
                                      Subliner
                                      wrote on last edited by Subliner
                                      #21

                                      @arminunruh Hello!

                                      Itยดs working for me, but it will be perfect if I can something like a "fade to white" .. Put white transparency when hover to see the black text better.

                                      Thanks!

                                      1 Reply Last reply
                                      0
                                      • mariusjopenM Offline
                                        mariusjopenM Offline
                                        mariusjopen
                                        Global Moderator
                                        wrote on last edited by
                                        #22

                                        Dear @Subliner
                                        you can achieve this by using CUSTOM-CSS.

                                        Best!

                                        Marius

                                        www.mariusjopen.world

                                        S D 3 Replies Last reply
                                        0
                                        • mariusjopenM mariusjopen

                                          Dear @Subliner
                                          you can achieve this by using CUSTOM-CSS.

                                          Best!

                                          Marius

                                          S Offline
                                          S Offline
                                          Subliner
                                          wrote on last edited by Subliner
                                          #23
                                          This post is deleted!
                                          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