Centering <ul>

I want to apply this css to centre the list on the page but can’t see how to apply css to an ul element in the block inspector:

ul {display: flex;
flex-direction: column;
align-items: center;
width: 100%;}

Is there a way to do this without adding a stylesheet? Any settings I edit in the block section seem to affect the individual li items, not the parent ul?

I can’t confirm this.
Styles do get applied to the parent list container (div, not ul/ol).

However, you can target your <ul> with Relative Styling to apply your styles via Block Inspector and without any custom code:

image

Hope that helps.

2 Likes

Hi @Marius
Just what I needed, thanks :pray:

1 Like