Setting the overall width of the tikiwiki site Posted by Paragtim 21 Feb 2009 12:33 UTC Hi all, Can someone tell me how to set the maximum width of a tikiwiki site. In this case I would like to restrict the maximum size to 800 px wide and to center this in the users display if they are using a higher resolution. Any help appreciated Tim
Posted by Rick Sapir / Tiki for Smarties 22 Feb 2009 00:29 UTC You'll need to edit the CSS file for your theme. Try setting the width of the body element to 800px. HTH, -Rick Need more help? Try TikiWiki for Dummies Smarties or read my Tiki Blog or visit my UserPage
Posted by Gary Cunningham-Lee 22 Feb 2009 05:24 UTC Actually a little more is necessary. To give the best answer, it'd be good to know what theme you're using, as Tiki's themes don't all use the same construction method. Generally speaking, to have the content in an 800px-wide area that's centered in a wider browser window, you'll need to give the width to an element within the body tags. For example, in most themes, there's a div class="main" that contains everything. So in the stylesheet, you'll have to add something like this: body {text-align: center} div.main {width: 800px; margin-left: auto; margin-right: auto} That said, I'm not sure what the behavior is of Tiki when the content width is limited in this way. Most themes now are designed to be full-width and use a method of floating divs to position the columns. In my tests in the past, behavior was erratic especially in IE7 when I tested limiting the width. The answer for me was to use a different method to make that type of layout, one that uses a table or two to contain the content. This method, although old-school, is stable even in IE7. -- Gary
Posted by clicc 18 Mar 2009 22:08 UTC I've been able to create customs themes using a set width with some success. I've used the same CSS-centering code as chibaguy provided. Ultimately, of course, its not a tikiwiki problem but a CSS compatibility problem across browsers. 🙁