Non-table layout
I'm working on a new style for my TIKI that will eliminate the use of tables for layout purposes. Instead, I'm using div elements to make my site 100% accessible.
I need a way to change the left and right margins in the tiki-center, depending if the left and right columns are active. I tried adding this to my tiki.tpl template:
<div id="tiki-center" style="
{if !empty($right_modules)}margin-right:149px; {else}margin-right:0;{/if}
{if !empty($left_modules)}margin-left:149px; {else}margin-left:0;{/if}">
...
</div>
I thought this would do the trick... if the $right_modules array is empty, there's no need for a margin. However, in my testing, it does not appear the $right_modules array is ever empty; even when there are no modules for the right column.
Is there an error in my expression, or is something else going on?
Thanks,
-Rick