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. Fixed content on 1st row / short cover

Fixed content on 1st row / short cover

Scheduled Pinned Locked Moved General Discussion
3 Posts 2 Posters 42 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.
  • P Offline
    P Offline
    panteley
    wrote on Jul 12, 2024, 11:54 AM last edited by panteley Jul 12, 2024, 7:56 AM
    #1

    Hey there,

    I'm gonna ask a specific thing, which i believe may be hard to find a solution but still I will try if somebody can help.

    What I would love to archive is something like this: Example

    So the idea is I like to have a Logo in the first section, which more or less will behave like a parallax cover, but shorter in height.

    I'm using a CSS i found in the forum:

    .cover-region, .cover-region-placeholder, .cover-inner {
        min-height: 34vh !important;
        height: 34vh !important;
    }
    

    What I don't like from this, is the fact that this way I cannot manage the space between the 1st section[cover] and the second one. Because on resizing the window, the space changes.

    Here is an illustration of what I'm trying to do:

    01.jpg

    On scroll, the 1st section stays fixed, while the second one cover it.

    ////////

    02.jpg

    On resizing the browser, the space between 1st and 2nd section to stay the same. [the area in blue]

    Looking forward to any help,
    Cheers,

    1 Reply Last reply
    0
    • A Offline
      A Offline
      arminunruh
      Global Moderator
      wrote on Jul 17, 2024, 12:45 PM last edited by
      #2

      sure!

      you use vh. which is viewportheight. when resizing (making the width of the browser smaller) the viewportheight stays the same.

      instead of vh use vw as the measuring unit.

      .cover-region, .cover-region-placeholder, .cover-inner {
          min-height: 34vw !important;
          height: 34vw !important;
      }
      

      you will need to use a different value than 34 for it to fit well i think

      P 1 Reply Last reply Jul 17, 2024, 1:02 PM
      1
      • A arminunruh
        Jul 17, 2024, 12:45 PM

        sure!

        you use vh. which is viewportheight. when resizing (making the width of the browser smaller) the viewportheight stays the same.

        instead of vh use vw as the measuring unit.

        .cover-region, .cover-region-placeholder, .cover-inner {
            min-height: 34vw !important;
            height: 34vw !important;
        }
        

        you will need to use a different value than 34 for it to fit well i think

        P Offline
        P Offline
        panteley
        wrote on Jul 17, 2024, 1:02 PM last edited by
        #3

        @arminunruh

        alt text

        1 Reply Last reply
        1
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes

        3/3

        Jul 17, 2024, 1:02 PM


        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.
        3 out of 3
        • First post
          3/3
          Last post
        0
        • Recent
        • Tags
        • Popular
        • Users
        • Search