Jump to content
Sign in to follow this  
Gavin_

assign different sidebar widths to different pages

Recommended Posts

Gavin_

Hi Pagelines people I need to assign different sidebar widths to different pages. On the home page i need the sidebar width to be 370px Where as on otehr pages i'd like the sidebar to be 250px thanks for your help in advance.

Share this post


Link to post
Share on other sites
cmunns

the layout editor only allows for global width but you can use page-ids and some css to change it on a particular page. What is the page you need changed?

Share this post


Link to post
Share on other sites
cmunns

` .page-id-2 .one-sidebar-right #pagelines_content #column-main, .page-id-2 .one-sidebar-right .wmain, .page-id-2 .one-sidebar-right #buddypress-page #container { width: 630px; } .page-id-2 .one-sidebar-right #pagelines_content #column-wrap, .page-id-2 .one-sidebar-right #buddypress-page #container { width: 630px; } .page-id-2 .one-sidebar-right #pagelines_content #sidebar-wrap, .page-id-2 .one-sidebar-right #buddypress-page #sidebar-wrap { width: 370px; } ` Follow the same setup for the contact page ( .page-id-39 )

Share this post


Link to post
Share on other sites
Kate

Hey Gavin, Double-check this, but I believe it's because #sidebar_primary is still not set to the correct width, thus cutting off the info inside of it.

Share this post


Link to post
Share on other sites
Gavin_

Hi Kate we have the default width for the sidebar at 250px but want to be able to modify the width on a specific page. Do we need to modify Adam's code?

Share this post


Link to post
Share on other sites
cmunns

Yes. I missed a selector: .page-id-2 .one-sidebar-right #pagelines_content #sidebar1, .page-id-2 .one-sidebar-right #buddypress-page #sidebar1 { width: 370px!important; }

Share this post


Link to post
Share on other sites
cmunns

You mean the login-tab? You can't have a 100% width if you want it to respect the margin:0 auto centering rule.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×