Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialNaoki Yoshida
6,984 PointsTrying to center the Modal Title and put at the right side the Register button but i can't!
I'm trying with mx-auto, text align center/end, with this code I found on bootstrap:
<div class="d-grid gap-2 d-md-flex justify-content-md-end"> <button class="btn btn-primary me-md-2" type="button">Button</button> <button class="btn btn-primary" type="button">Button</button> </div>
but nothing works! How is the way?? I'd be super grateful.
2 Answers
Travis Alstrand
Treehouse TeacherHey Naoki Yoshida I hope that these doc pages could prove helpful
It may also depend what version of bootstrap you're using.
notrackx
3,230 PointsYou should set the button to behave as block element first (I got the same problem while centering my button in the form).
<form>
...
<button type="submit" class="btn btn-primary mt-3 d-block mx-auto">Register</button>
</form>