5
submitted 4 months ago by Seimhe@lemmy.world to c/wordpress@lemmy.world

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.

you are viewing a single comment's thread
view the rest of the comments
[-] DecorativeTarp@lemmy.zip 1 points 4 months ago* (last edited 4 months ago)

This is largely a flexbox question:

https://stackoverflow.com/questions/31000885/align-an-element-to-bottom-with-flexbox

Have to make sure the parent element of the text and buttons is set to an appropriate display:flex and is also taking up the full height of the grid item though (if it’s not just the grid item itself).

[-] Seimhe@lemmy.world 1 points 4 months ago* (last edited 4 months 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 2 points 4 months ago* (last edited 4 months 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.

[-] Seimhe@lemmy.world 1 points 4 months 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 2 points 4 months ago* (last edited 4 months 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.

[-] DecorativeTarp@lemmy.zip 2 points 4 months ago

Might’ve missed this with my edit timing:

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

[-] Seimhe@lemmy.world 1 points 3 months 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.

this post was submitted on 02 Jul 2026
5 points (100.0% liked)

WordPress

859 readers
19 users here now

A place to talk about WordPress the open source content management system. Also a place to ask for help with WordPress. Don't be rude, don't spam.

I check this once a week, so if you don't hear from me hit me up on Mastodon (phillycodehound@indieweb.social)

founded 3 years ago
MODERATORS