Left/Right Spacing/Padding/Margin

Hello Anvilians,

Good day!

I just want to ask if there’s a way to add left or right space / padding / margin into a column or flow panel? See image below for reference.

image

Thank you,
Joey

For this purpose, I often user the Spacer component.

2 Likes

If you are OK with CSS, another way would be to use “roles” (see here : https://anvil.works/docs/client/themes-and-styling)

You could create a “right-pad-5px” role and add it to the component in the IDE.

1 Like

If you put the button in to a resizable container like a Flow Panel also works but that location should already have a Flow Panel as part of the Template.

1 Like

Thanks, Colbert! Yeah I actually tried doing it that way. It does the job. I just felt like there must be a better way so I went ahead ask this question.

Thank you, David! Unfortunately, I’m not good with CSS. But yeah, thanks for sharing this resource. I’m sure this is going to be helpful.

Thanks, Rick! The button is inside a Flow Pannel with right alignment. For the record, this is a blank template. Not the Material template with built in header.

1 Like

I tried this @david.wylie and it worked! Using basic CSS Role unlocked! Thank you!

1 Like