Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Template Questions /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Adjusting content width depending upon sidebar


Go to End


1866 Views

Avatar
Happysadhu

Community Member, 33 Posts

24 July 2009 at 9:28am

Hi,
I would like to know how to set up a template so that if there is no sidebar content (in this case on the right), the main content div width fills up the entire content container. If there is a sidebar, the main content div is narrowed -- for example from 100% to 70% to make room for the sidebar.

Looking at the blackcandy template, the content id is always set at 70% whether or not the left navigation sidebar is present. However, I would like the main content to fill up (adjust to) the available space.

Thanks for any help,
Sam Miller