It's a couple of years since this thread was active, but I was looking to set button widths and found it this morning. After some experimenting, I found the percentage width HTML coding useful for my purposes. It made the buttons a consistent width on my Canvas pages. Because I wasn't worried about height, it did the job. All of my buttons are now the same width, and if the text is too long to fit in a single line the button automatically resizes to accommodate it. If you want consistent width and height, this may not be what you need.
I'll take some sample code from the fantastically helpful Buttons on Canvas pages thread:
<a class="btn" title="Front Page" href="https://community.canvaslms.com/courses/346426/pages/front-page" data-api-endpoint="https://weber.instructure.com/api/v1/courses/346426/pages/front-page" data-api-returntype="Page">Plain Button</a></p>
To this I'll add the style code (blue and bold for visibility) to set the button width:
<a class="btn" style="width: 40%;" title="Front Page" href="https://community.canvaslms.com/courses/346426/pages/front-page" data-api-endpoint="https://weber.instructure.com/api/v1/courses/346426/pages/front-page" data-api-returntype="Page">Plain Button</a></p>
You can change the percentage to any number that is appropriate for your purposes.
This won't work for everyone and every Canvas page, but for what I'm doing in my courses, it neatens things up very nicely.
This discussion post is outdated and has been archived. Please use the Community question forums and official documentation for the most current and accurate information.