How to Align a Nested, Partial-Width Group Block via the WordPress Editor

How to Align a Nested, Partial-Width Group Block via the WordPress Editor

Posted by WP Tavern on April 15, 2022 at 6:28 pm
kitty kitty CATegory News
I was slightly frustrated last week when sharing a tutorial on a hero-style post header. I had planned to create a layout with a left-aligned Group with a maximum width, as shown in the following screenshot: This would allow the focal point of the background image to shine through on the right. However, neither of the two known techniques seemed to be ideal. One of the most common methods is to use a 50/50 Columns block, leaving the right column empty. This was messy at some screen sizes. However, as noted by Andrew Starr in the comments, setting a specific width for the left column and clearing the width for the right-side column addresses this issue. Hat tip to him for finding a way to work within the system. Still, it is not the most intuitive method and leaves an empty <div> in the HTML for no good reason. It feels like a hack that we should not be teaching users. My gut was telling me that my preferred solution was the right one. It was also the simplest to implement without resorting to hacking columns. It uses the content alignment matrix control for the Cover block combined with a…

…Full post on WP Tavern
Read Full

Similar Posts

Leave a Reply