Loading...
 
Skip to main content

Themes


Change Width of Center Column

I'm looking for some pointers on how to widen the center column and narrow the side columns of the "thenews". I've figured out the options, and starting with "narrow-left-column" got one that makes left and right columns narrow. However I can't figure out how to make the center column wider.

Any help with this would be appreciated.

Thanks!

The side column sizes are specified by the theme stylesheet, styles/thenews.css. For the "narrow-left-column" option, there is a supplementary stylesheet, styles/thenews/options/narrow_left_column.css. The center column will widen to fill the space between the side columns, if everything is specified correctly.

The most future-proof method (to avoid having your customizations overwritten by a future Tiki upgrade) would be to make another theme option stylesheet and put it in the same directory as narrow_left_column.css. You can name it whatever you like, and it should contain these lines:

#c1c2 #wrapper .marginleft { margin-left: LEFT-COLUMN WIDTH; }

* html #c1c2 #wrapper .marginleft { margin-left: LEFT-COLUMN WIDTH + 2px; }

#c1c2 #wrapper .marginright { margin-right: RIGHT-COLUMN WIDTH; }

#c1c2 #col2 { width: LEFT-COLUMN WIDTH; }

#col3 { margin-left: -RIGHT-COLUMN WIDTH; width: RIGHT-COLUMN WIDTH; }

* html #col2 div.box,
* html #col3 div.box { width: LEFT-COLUMN WIDTH - 33px; }

where LEFT-COLUMN WIDTH is the width you want for the left column and RIGHT-COLUMN WIDTH is the width you want for the right column (units are px). Note that these figures are used more than once and minus in one instance: each side column has a width and a margin offset, whose figures must be the same.

The "* html" lines are special properties that were found to be needed for Internet Explorer 6. You need to add or subtract the pixel amount from the modern-browser value and use the calculated amount for IE6.

If you use a CSS menu (suckerfish/Superfish menu) in the left column, you might also need to adjust its dropdown offset. These are the relevant lines from the narrow theme option, to use as a guide:

#col2 .cssmenu_vert > li { width: 130px; }

#col2 .cssmenu_vert li ul {margin-left: 130px}

This theme is a little tricky regarding columns because of the need to get the borders to coincide (not be double). Phew, I guess that's it. I think I'll make a wiki page something like this for future reference. 😉

-- Gary