Loading...
 
Skip to main content

History: Full-width backgrounds and fixed-width content

Source of version: 8 (current)

Copy to clipboard
            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:
{CODE()}
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;
}
{CODE}
 



        

History

Advanced
Information Version
Wed 04 of Apr, 2018 07:55 GMT-0000 Gary Cunningham-Lee Added the relevant CSS, for documentation purposes. 8
Tue 27 of Mar, 2018 14:50 GMT-0000 Gary Cunningham-Lee Fixed details. 7
Tue 27 of Mar, 2018 14:41 GMT-0000 Gary Cunningham-Lee "+" to indent a line doesn't seem to be working. 6
Tue 27 of Mar, 2018 14:39 GMT-0000 Gary Cunningham-Lee Updated with new method info. 5
Wed 11 of Apr, 2012 01:32 GMT-0000 Gary Cunningham-Lee Temporarily deleting code to test page view in mobile. 4
Wed 11 of Apr, 2012 01:32 GMT-0000 Gary Cunningham-Lee Temporarily deleting code to test page view in mobile. 3
Wed 11 of Apr, 2012 01:30 GMT-0000 Gary Cunningham-Lee Replacing pp with code plugin to try to resolve blank page in mobile view. 2
Sun 11 of Mar, 2012 02:01 GMT-0000 Gary Cunningham-Lee Page created. 1