MyBB Community Forums

Full Version: what class to center the container?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
There is no bootstrap class for center, unless you are trying to center text, in which case use class .text-center

There are helper classes where you can push / offset on the grid eg. col-sm-offset X

Are you trying to center a col-lg-6 ?

offset can't be used on col-xs, only sm and bigger.

<div class = "container-fluid">
<div class= "row">
<div class="col-lg-offset-3 col-lg-6">Your text</div><div class="col-lg-3"></div>
</div>
<div>
Guess offset would only work on 2-4-6-8 and so on, not on 3-5-7 and so on.
Not shore I understand what you need, but there are different ways to center, and the question is what to center.

Ashley1 did show you how to use full width, when using "container-fluid", you can also add "center-block"

(add <div class="center-block"> under "row", and add a </div> at the end.

Still not shore if I understand what you are looking for ,,,but..
essentially you need a class that has margin:auto auto

there are a couple JS solutions to get the center alignment, horizontally and vertically

AND yeah Bootstrap has the center-block, but what do they mean by mixin?
mixins is a part of less.

center-block will provide the margin. Offset will make conflict if grind is not in same number order, eg col-sm-offset-x should be used if grid is 2-4-6 and so on, and not combined with 2-4-6 and so. With other words,IF we are using
col-sm-3, col-sm-6 col-sm-3 , then we should not use offset.

but as told, I guess center-block would help, if I understand the q, then. Can also be used inside a div, as a class, or a new div..
is it just me or if offsetting is like clearing the floats? so its not stacking as overlays
Pages: 1 2