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

Content Alignment on Home Page


Go to End


3 Posts   1835 Views

Avatar
jfusco

Community Member, 53 Posts

31 January 2009 at 7:17am

I installed in tutorial mode. All of my standard files are based on the tutorial. As I went through the tutorial, I opted not to add the browser poll. what I have now is a phantom 'column' on my home page where there is space for the poll or other information but it pushes my content to the left side of the page. The banner is centered just fine.

Eaxmple: http://www.unclebubby.com/wavs2

How do I get rid of the phantom column and center my content? I've been looking through the php, css and ss but can't for the life of me figure out where it is.

Thanks,
Joe

Avatar
Carbon Crayon

Community Member, 598 Posts

1 February 2009 at 4:18am

Edited: 01/02/2009 4:26am

are you talking about a page like this one. I think i see what you mean.

There is no sidebar, its just that the content width is set to 70% and is floated left, so there is a 30% space on the right. To center the content at 70% width add this to the css for #content{ margin: 0 auto; }

alternatively you can remove the <div id="content"> from the template so that the page fills 100% width. You could also (and this would be my choice) add the Menu2 onto those pages which would also help with user navigation.

Aram

Avatar
jfusco

Community Member, 53 Posts

1 February 2009 at 6:36am

I ended up adding a 15% left margin and that seems to have done the trick. I like the auto option better, though. That way I can noodle with the width all I want and the system takes care of it.