• Hello,

    I’ve just started to play around with WordPress and I’m trying to create a site using the Twenty Twenty-Four version 1.0 theme.

    For the most part things are working as expected and I’m creating a homepage using the built in editor. For this homepage I’m including a header with a full image. Within this image in the center I’m looking to display some text so I have a group within a group. The parent group has the Coverage and the Header. The sub group within the parent has a header and paragraph text. Ideally I would like the header at the top of the Cover and the sub group in the center. For the life of me I can’t seem to figure out how to do this. I’ve checked the documentation but can’t seem to find a way to do this.

    Here is a link to my editor view.

    Does anyone know if this can be done?

    • This topic was modified 10 months, 2 weeks ago by jcat1. Reason: updating link

    The page I need help with: [log in to see the link]

Viewing 12 replies - 1 through 12 (of 12 total)
  • Your link to the editor view requires a Google account login. Can you post the screen shot on another online venue that does not require account access?

    Thread Starter jcat1

    (@jcat1)

    Sorry about that. The updated link is here.

    Hey @jcat1! It looks like you should be able to do something like this by applying the same top and bottom padding to the innermost group block, and removing any height setting from the larger, outermost one. If you choose the padding to be in % units, it will also work well on multiple screen sizes. You can find out about setting padding in this article about dimensions.

    Thread Starter jcat1

    (@jcat1)

    Thanks @properlypurple. I tried the padding idea using percentages and it word fine for the desktop view but when it translated to the table and laptop views it didn’t work. As the screen size keeps getting smaller the text keeps moving upwards.

    Hey @jcat1! Can you try using a cover block instead of the group block? It has controls for alignment of inner content ( like shown in this article ). You would also want to change the opacity of the background color to 0, so it doesn’t stand out.

    Thread Starter jcat1

    (@jcat1)

    Thanks @properlypurple. So I found that I had to use the group in the cover block as I wanted the header to be in front of the image as opposed to having it’s own background color. When doing it this way if I use the inner content alignment it will move the header to the center also.

    The desire design is something like this https://www.ads-software.com/showcase/moooi/ where the header is in front of the image and the text is centered regardless of screen size.

    @jcat1, I’m actually suggesting using a new cover block as the wrapper for your inner content, instead of the innermost group block. This way you will leave the main, outermost cover block which makes up for your banner, and you will have a smaller cover block inside, just to center-align the headline and text.

    Thread Starter jcat1

    (@jcat1)

    @properlypurple so I tried to cover block and it’s requirement me to put in image in the block so now I have an image within and image.

    @jcat1 With a cover block, you can either specify an image, or choose a color. I’ve recorded a short video that shows you how to do this.

    Thread Starter jcat1

    (@jcat1)

    @properlypurple Thanks but ideally I want that new block to be clear so that the lower level cover image is seen but only the text is centered. I’ve tried to make the color block set to transparent but it still comes out as black with my setup.

    Thread Starter jcat1

    (@jcat1)

    I think I finally found a solution that gets me close enough. I have the main Cover block that highlights the feature image. I then have a group within the Cover block that has margins set to a value to em: Relative to the parent element and that appears to work across desktop, tablet, and mobile views.

    Hey @jcat1! I’m glad you found a solution. About this:

    I’ve tried to make the color block set to transparent but it still comes out as black with my setup.

    If you still see this, it would be helpful to make a test page on your site and share a link, and then it’ll be easier to find out what’s happening.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Centering a Group within a Group’ is closed to new replies.