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 trialSincere Villanueva
5,992 PointsHorizontal centering with "mx-auto"
Per the documentation, "mx-auto" can only be used on content that has "display: block" and a "width" set. I do not see where either of these properties were defined in the code.
Could someone please explain where these properties were defined?
Thanks so much!
1 Answer
Iain Simmons
Treehouse Moderator 32,305 PointsNote that many HTML elements have a display
value of block
set by default (or rather, by the user agent/browser), and would then effectively have a width
of 100%
.
Mike Schaming
13,925 PointsMike Schaming
13,925 PointsHi- I'm assuming the display and width are included in the class used for the input- accessed from the Bootstrap CDN. But I may be wrong- it's a little different for me not using a CSS file.