
CSS: Centering Content For Various Screen Sizes
The following, when added to a .css file, will center the content on screens > 600px. For screens < 600px the content will end up spanning the whole page. .your-class-name { display: block; max-width: 600px; margin: auto; } In bootstrap, you can also use the "mx-auto" class for horizontal centering. It can only be used on content that has specifications for display: block; width: "some amount". Example inline code: <div class="mx-auto" style="display: block; width: 100px;"> Centered Content </div>