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. Using flexbox in custom CSS & HTML

Using flexbox in custom CSS & HTML

Scheduled Pinned Locked Moved General Discussion
griddergridflexbox
9 Posts 2 Posters 1.5k 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.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by
    #1

    Hi Armin,

    I just created a type of "vertical Grid" that I wanted to lay beneath the content of my website. You can look at the code here (https://jsfiddle.net/5k66obh2/) I used Flexbox to do that.

    But when I now copy the code into the "Custom CSS & HTML" section from Lay Theme it totally destroys my website.

    Is this because Lay Theme itself uses Flexbox?

    Best,
    Quirin

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

      Lay Theme uses flexbox. Also there is already a div with an id of "grid" in lay theme that might be the reason why your css crashes the layout. I think it's a good idea if you can rename your ids and classes and use a prefix like "qvoder". So it would be "#qvoder-grid".
      If you add your grid's html into "Custom CSS & HTML" -> "Custom HTML at bottom" for example then it should work I think.

      1 Reply Last reply
      0
      • ? Offline
        ? Offline
        A Former User
        wrote on last edited by
        #3

        Hi Armin,
        thanks for the answer! I just implemented your tips. Now the layout of the website stays intact but the grid begins straight underneath the website. And when I add the HTML to the "Custom HTML at top" the grid is above the website. So it looks like there isn't a way to "combine" the grid and the website.

        Best,
        Quirin

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

          Hey Quirin,
          If you want your grid underneath lay themes grid why dont you try position: absolute or position: fixed with your grid

          #qvoder-grid{
          position: fixed;
          top: 0;
          left: 0;
          z-index: -1;
          }
          

          Not sure if the z-index value is the right one, maybe you have to play with that value.

          ? 1 Reply Last reply
          0
          • arminunruhA arminunruh

            Hey Quirin,
            If you want your grid underneath lay themes grid why dont you try position: absolute or position: fixed with your grid

            #qvoder-grid{
            position: fixed;
            top: 0;
            left: 0;
            z-index: -1;
            }
            

            Not sure if the z-index value is the right one, maybe you have to play with that value.

            ? Offline
            ? Offline
            A Former User
            wrote on last edited by
            #5

            Hi Armin,
            thank you! It works! The Grid lies underneath the website. But now another problem occurs. The Footer disappears. The "funny" thing is. If I deselect the footer (Lay Options > Footers) the grid also disappears. And if i activate the footer the grid also comes back. Ahh one problem solved, another one comes up : )

            Best,
            Quirin

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

              is the option "sticky footer" active? maybe that is the problem, not sure.

              1 Reply Last reply
              0
              • ? Offline
                ? Offline
                A Former User
                wrote on last edited by
                #7

                Hey Armin,
                jep is active. And if I deselect the option the grid disappears and the footer comes back.

                Best,
                Quirin

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

                  hmm,
                  does it change anything if you dont use flexbox for your grid?
                  not 100% sure whats going on there.

                  1 Reply Last reply
                  0
                  • ? Offline
                    ? Offline
                    A Former User
                    wrote on last edited by
                    #9

                    Yeah all kinda weird there. No, didn't try it without using flexbox. Barely got the grid together using flexbox. Because flexbox was/is relatively easy to understand for me. My skills regarding coding are very basic ;)

                    Right now the footer is more important. The Grid would be a nice to have but is not essentially for the website. More a cosmetic thing.

                    Best, Quirin

                    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
                    arminunruhA
                    arminunruh
                    F
                    francesco
                    L
                    lurchifon
                    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