Skip to content
  • Recent
  • Tags
  • Popular
  • Users
  • Search
Skins
  • Light
  • Brite
  • 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. 100% height column (not row)

100% height column (not row)

Scheduled Pinned Locked Moved General Discussion
6 Posts 2 Posters 1.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.
  • S
    S
    s.alc
    wrote on last edited by
    #1

    Hi Forum,

    I'm working on a website on which I want to assign a background color to a selected number of columns, and have that color follow the height of the row. To illustrate what I've got right now i've added 2 screenshots.

    0_1526383824186_Screen Shot 2018-05-14 at 17.27.28.png
    0_1526383494084_Screen Shot 2018-05-14 at 17.28.31.png

    So what i've done is inserted a Stack element and gave this a custom css class called 'columns-turqoise'. Adding 'height: 100%;' doesn't do the job. I have tried 'height: 100vh;'. That works for the yellow part because I want that row to be full height, but for another part below, where I want the selected columns to be green, '100vh' is too much because I want the green part to take on the height of a text column that sits next to it.

    Also, i want the content of the stack element still be aligning vertically 'middle' (the logo on the turquoise columns).

    What css code can I use to make this happen?

    Thanks a lot!
    Cheers

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

      Dear @Hantverk

      Add this to your inner STACK ELEMENT:

      .YOUR_STACK_CONTAINER .column-wrap {
          position: relative;
          top: 50%;
          transform: translateY(-50%);
      }
      

      Better to use the VH instead of %.

      I hope I could help!

      Marius

      www.mariusjopen.world

      1 Reply Last reply
      0
      • S
        S
        s.alc
        wrote on last edited by s.alc
        #3

        Dear Marius,

        Thank you for your help. This helps me to vertically center content when using '100vh'.

        But this only partly solves my problem. How do I make sure the Stack element follows the height of the row, without using the full viewport?

        0_1526475956112_Screen Shot 2018-05-16 at 15.03.22.png

        Thanks!
        Cheers

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

          Dear @Hantverk
          it is not possible to stretch the STACK element to the 100% heigh to the parent box..

          Can you show on a sketch how you want the final result to look like?

          Thank you!

          Marius

          www.mariusjopen.world

          1 Reply Last reply
          0
          • S
            S
            s.alc
            wrote on last edited by
            #5

            Thank you Marius,

            I've retro-fitted the element by giving the full row a background color and giving the stack element that contains the text a custom class with a white background. So now the colored background always stretches because it is covered by a white background where the text sits.

            Cheers!

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

              Dear @Hantverk
              ah! Perfect!
              This is a way to go in your case.

              Thank you for letting us know.

              Best!

              Marius

              www.mariusjopen.world

              1 Reply Last reply
              0

              Hello! It looks like you're interested in this conversation, but you don't have an account yet.

              Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

              With your input, this post could be even better 💗

              Register Login
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              Online Users
              I
              Ingi
              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