Loading...
 

Full-width backgrounds and fixed-width content

A newly installed Tiki site has a left column and center or main column, and a right column can also be activated. The side columns are normally used for navigation or other information that displays on every page (though this can be configured, of course). To easily have a page, such as the site homepage or a splash page, that has no side columns, and some content such as background images goes the full width of the browser window, here is an easy method, available since Tiki 15.

1. On tiki-admin_categories.php, make a new category "Full_width_content".
2. On tiki-admin.php?page=category, activate "Provides the current categories to Smarty templates", and select "Full_width_content".
This will add a CSS class to the body tag of pages in this category, and CSS rules in tiki_base.css will cause the side columns to not display, and will override the standard container div rules.
3. Then container divs, grid divs and other content can be input in the wiki page. Content directly in the page data will be full-width. Container-class divs can be added to provide content areas that are centered in the page and the default Bootstrap container width.

These are the relvant CSS rules in tiki_base.css:

cat_Full_width_content > .container,
.cat_full_width_content > .container,
.cat_Full_width_content .middle.container,
.cat_full_width_content .middle.container,
.cat_Full_width_content .layout_social > .container,
.cat_full_width_content .layout_social > .container {
  width: 100%;
  padding-left: 0;
  padding-right: 0;
}
.cat_Full_width_content #row-middle.row,
.cat_full_width_content #row-middle.row {
  margin-left: 0;
  margin-right: 0;
}
.cat_Full_width_content #col1,
.cat_full_width_content #col1 {
  padding-left: 0;
  padding-right: 0;
}
.cat_Full_width_content .content-area,
.cat_full_width_content .content-area {
  padding: 0;
}
.cat_Full_width_content .catblock,
.cat_full_width_content .catblock,
.cat_Full_width_content .wikitopline,
.cat_full_width_content .wikitopline,
.cat_Full_width_content .wikiactions_wrapper,
.cat_full_width_content .wikiactions_wrapper,
.cat_Full_width_content #page-bar,
.cat_full_width_content #page-bar {
  padding-left: 15px;
  padding-right: 15px;
}




Switch Theme

Layout

Subscribe to Tiki Newsletters!

Delivered fresh to your email inbox!
Newsletter subscribe icon
Don't miss major announcements and other big news!
Contribute to Tiki

Site Config

Shoutbox

chibaguy, 11:20 GMT, : Testing the shoutbox.
luci, 14:22 GMT, : @Bsfez: :-D
Bsfez, 09:52 GMT, : This is really a nice Tiki !
chibaguy, 10:32 GMT, : Site admins: Be careful about editing the topbar menu, which is in a small space. I had to fix an option that should be a menuSection, to prevent overflow.
Torsten, 19:44 GMT, : hidden functionality "; recommitted in trunk, tested and working. Documentation under way on [Link]