XF 1.2 sidebar width

ld762

Member
I know the SideBar width can be adjusted in the ACP but is it possible to change it programmatically?

I saw the code below in the "move sidebar to the left" article so I am thinking it could be done. But not sure how since I don't know the correct reference for the PHP variable.

Code:
.mainContainer
{
float: right;
margin-left: -{xen:calc '@sidebar.width + 10'}px;
margin-right: 0px;
width: 100%;
}
 
What is it you're trying to do exactly?
Some more context may help.

The variable above is actually a style property - they can be used in templates like that.
 
The default sidebar is set to 250 on one particular page, I'd like to set it to something smaller say 200.
So the width would change depending on the current page. Would that be possible?
 
Use specificity in EXTRA.css for each page.
For example, this will just affect the sidebar on the main forum list page.
Code:
.forum_list .sidebar {
width: 200px;
}
 
Back
Top Bottom