The home page for my site is looking like this so far. The only problem is that I can’t get the buttons aligned horizontally.

The setup is a grid container containing 3 group items. Within each group is a H3 heading, paragraph, list items and a button. The buttons at the bottom should all line up.

There aren’t many options in the actual editor for things like this. I’ve set the buttons to be centre justified and I’ve set the vertical alignment to “bottom”.

I don’t mind adding custom CSS in the sidebar for the blocks, but it would need to be responsive.

  • visnae@lemmy.world
    link
    fedilink
    arrow-up
    3
    ·
    21 days ago

                                                      

    That should do it

    • Séimhe (sé / é)@lemmy.worldOP
      link
      fedilink
      arrow-up
      1
      ·
      21 days ago

      If I could get a job as the guy who lays  s - sort of like a brick layer - I think I could have enjoyed web development. Thanks, that looks like you’ve sized it about right :)

  • grandel@lemmy.ml
    link
    fedilink
    arrow-up
    2
    ·
    edit-2
    21 days ago

    Could we get a link to it so we can inspect the markup?

    I’m a web developer so I feel confident I can get it the way you requested.

      • grandel@lemmy.ml
        link
        fedilink
        English
        arrow-up
        2
        ·
        edit-2
        20 days ago

        Sweet, thanks!

        Using this markup I think I was able to achieve what you were asking for:

        .site-main .wp-block-group__inner-container {
            display: flex;
            flex-flow: column nowrap;
            height: 100%;
        }
        
        .site-main .wp-block-group__inner-container .wp-block-buttons {
            margin-top: auto;
        }
        

        But this is not ideal, it’s merely a quick and dirty proof of concept. I have a couple of follow up question, since It’s a been a while I worked with WordPress:

        1. Is there a way to make the columns “stretch” because they currently don’t fill their container:

          If there is, please remove the height: 100% css markup.

        2. Could you add a custom class to the columns? Otherwise the markup will apply to all columns on your site.

        3. Could you add a custom class to the button? Otherwise the markup will apply to all buttons on your site.

        • Séimhe (sé / é)@lemmy.worldOP
          link
          fedilink
          arrow-up
          2
          ·
          21 days ago

          Oh wow, this works! Thank you so much!

          I’m not sure about columns stretching. I assume you mean within the Wordpress editor? In that case I don’t think so, because it’s a grid tool of sorts the user can’t do much else with it.

          I well certainly add custom classes to contain the CSS you’ve given me. Thank you so, so much.

    • Séimhe (sé / é)@lemmy.worldOP
      link
      fedilink
      arrow-up
      1
      ·
      edit-2
      22 days ago

      Thanks. It appears to be a grid layout as opposed to flex in this case, however.

      Edit: you know what, I’ve just made sure that each section has the same amount of text. Not ideal, but it solves the issue quickly.

      Edit 2: That actually only works in very specific screen widths actually, so not a solution. I’m kind of surprised the graphical editor hasn’t solved this issue. I remember dealing with it back around 2013 and assumed it would be handled by now lol.

      • DecorativeTarp@lemmy.zip
        link
        fedilink
        arrow-up
        2
        ·
        edit-2
        22 days ago

        You can set the grid item to display: flex, they’re not totally mutually exclusive (one can be within the other). Kinda hard to blindly walk through stuff like this without seeing the HTML/CSS though.

        One of those cases where browser dev tools are your friend as it should only need a few properties, you can poke and prod to see how they land, and you can see whether you’re getting a 100% height fill on the parent.

        • Séimhe (sé / é)@lemmy.worldOP
          link
          fedilink
          arrow-up
          1
          ·
          22 days ago

          Thanks, I appreciate the helpful reply. I’ll try that, and if I don’t figure it out I can always hire someone to tidy up loose ends like this once the overall design is finished. Happy to send the work your way if you do that kind of think. I’ve used Upwork previously.

          • DecorativeTarp@lemmy.zip
            link
            fedilink
            arrow-up
            2
            ·
            edit-2
            21 days ago

            Nah, have too much on my plate. Just saw this pop up while browsing hot, and it’s a common design pattern without an obvious solution.

            This snarky comment is the one that actually shows what you need in full though.

            • Séimhe (sé / é)@lemmy.worldOP
              link
              fedilink
              arrow-up
              1
              ·
              21 days ago

              That looks exactly like my situation, thank you! This might actually let me use the default Wordpress blocks as I am currently and apply CSS in the side-bar custom CSS box for each element. I was hoping not to write custom HTML so that the “client” (my friend) can take it over when I’m done.