{maketoc}
Bootstrap grid in Tiki13
From Tiki 13 we use the responsive Bootstrap CSS Framework to determine the layout of Tiki.
The floated box method previously described here has been made obsolete by the switch to Bootstrap CSS grid compatibility. How to have columns in wiki content using the new Bootstrap method is described below. To see the previous Tiki floating box method, check the page history for earlier versions of the page content.
The method described here uses the Bootstrap layout method without any "shortcuts". It may not be possible - or practical - to duplicate the compactness of the old floating box syntax, but that hasn't really been experimented with yet.
As in Bootstrap the full width of a div is a part of 12 gutters, a number of 1 to 12 elements can be put besides each other, each in a div, using the column classes of Bootstrap. The column classes determine the relative with of the elements and the "breakpoints" based on device width (@media queries), when the elements get vertically stacked (mobile device, tablet, smartphone or shrinking the browser width).
Some examples:
Please mind, that adding the width parts of the class name (the number) must give 12 when added (6+6 or 4+4+4 or 2+2+2+6 or 3+4+3+2 etc.)
The {DIV(class=row)} wraps together the 12-gutter side by side elements and "clearfixes" the content to the following part of the page (or custom module or template, if used with html -> div class="row").
"content" refers to arbitrary elements like text, modules, wikiplugins ...
3 Elements equal width (three times -4), 'side by side' - switching to 'vertically stacked' at lower than medium (-md-) with:
{DIV(class=row)} {DIV(class=col-md-4)}content{DIV} {DIV(class=col-md-4)}content{DIV} {DIV(class=col-md-4)}content{DIV} {DIV}
2 Elements equal width (twice -6), 'side by side' - switching to 'vertically stacked' at lower than large (-lg-) with:
{DIV(class=row)} {DIV(class=col-lg-6)}content{DIV} {DIV(class=col-lg-6)}content{DIV} {DIV}
4 Elements different width, 'side by side' - switching to 'vertically stacked' at lower than small (-sm-) with:
{DIV(class=row)} {DIV(class=col-sm-3)}content{DIV} {DIV(class=col-sm-3)}content{DIV} {DIV(class=col-sm-2)}content{DIV} {DIV(class=col-sm-4)}content{DIV} {DIV}
Examples
Two columns
is produced by:
{DIV(class="row")}{DIV(class="col-md-6")}{MODULE(module=random_pages)/}{DIV}{DIV(class="col-md-6")}{MODULE(module=random_pages)/}{DIV}{DIV}