[ARCHIVED] Buttons side by side?

Jump to solution
DanielleBowers
Community Member

Hi! I am very new to HTML coding in Canvas. I found a great template to create my buttons, but they only show up one per line. I really would like to get them two or even three per line. How do I do that? I would need specific instructions as to where to place the proper coding as I am so new to this. Thank you!

Labels (2)
0 Likes
1 Solution
EthanDeceuster
Community Member

You could also use "display: inline" to have your block elements side by side.  For example, this bit of code has two links styled as Canvas buttons that are displayed side by side with 10px space between them:

<p style="display: inline; margin-right: 10px;"><a class="Button Button--primary" style="width: 45%;" href="#">Link text</a></p>
<p style="display: inline;"><a class="Button Button--primary" style="width: 45%;" href="#">Link text</a></p>

Preview:

2022-03-30_09-14-42.png

You could do the same with images as buttons, just wrap them in a <p> element and apply the inline display and use margins to create space between them.

If you're interested in expanding your custom styling options in Canvas, you can check out the DesignPLUS product from Cidi Labs.  There are dozens of great features to make this type of styling quick and easy.  One example related to this question is that DesignPLUS can apply Bootstrap column layouts to Canvas pages.

I used to do everything inline but using DesignPLUS opened so many new features and saved me many hours trying to do it all manually.

View solution in original post