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. Specific fixed row

Specific fixed row

Scheduled Pinned Locked Moved General Discussion
2 Posts 2 Posters 83 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.
  • D Offline
    D Offline
    DLB
    wrote on last edited by
    #1

    Hi there,

    I’m trying to figure out how to have a specific fullscreen image (100vh) fixed when scrolling.

    This Lay theme website is a perfect example of what I’m trying to implement:
    http://bodyandspace.de
    When scrolling down the second to last row is fixed (with a fullscreen image), so it looks like it’s behind the rows above. The last row then scrolls over the second to last fixed row. I’ve inspected the code for this site, but can’t seem to figure it out.

    I know how to make a full screen image (or another element) fixed using custom HTML / CSS, but this just appears fixed in the first row. So I’m assuming there is a way to target a specific row element further down?

    Any pointers / direction or help, would be greatly appreciated.

    Thanks very much, Des

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

      Dear Des

      @DLB

      The row itself is empty within the Gridder but has been given a custom class called parallax. You can do this by 'right-clicking' on the row "set HTML Class and ID" :

      Screen Shot 2022-05-10 at 12.03.55 PM.png

      You can see here the Row is empty of content but has the class:
      Screen Shot 2022-05-10 at 11.43.40 AM.png

      They have some custom CSS:

      @media (min-width: 601px){nav.second_menu li:last-child {
      	display: none;
      }
      
      img.lazyloaded, .col img.lazyloaded {
      	height: 100vh;
      	object-fit:cover;
      }
      
      .hero-section {
        width: 100%;
        	height: 100vh;
      	object-fit:cover;
        overflow: hidden;
        position: relative;
      }
      
      .hero-section img {
        width: 100%;
        position: absolute;
        top: 0;
        left: 50%;
        transform: translate(-50%);
      }
      
      .parallax {
        /* The image used */
        background-image: url("https://bodyandspace.de/wp-content/uploads/2021/05/PRO22454.jpg");
      
        /* Set a specific height */
        min-height: 500px;
      
        /* Create the parallax scrolling effect */
        background-attachment: fixed;
        background-position: center;
        background-repeat: no-repeat;
        background-size: cover;
      }}
      

      You can see the image is applied to the row as a background via URL.

      This link will help you with inspecting behind the scenes of website to find out how they work:

      https://www.khanacademy.org/computing/computer-programming/html-css/web-development-tools/a/using-the-browser-developer-tools

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


      Best
      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