XF 1.4 Wider sidebar for Guests

akia

Well-known member
I want to make my sidebar wider but just for guests only.

I know you can change it in the style settings but this changes it for everyone. Is there a way just to make it for guests only?
 
There is a class for users, LoggedIn and LoggedOut that you can use in CSS.

Rich (BB code):
.LoggedOut .mainContainer { margin-right: -285px; }
.LoggedOut .mainContent { margin-right: 285px; }
.LoggedOut .sidebar { width: 275px; }

You'll want to keep mainContainer and mainContent adjusted correctly. So default sidebar is 250px wide, I went up 25px so if you notice also had to adjust the other 2 margins which were 260px & -260px.
 
Yeah me also. I started off by adding a conditional in the sidebar class in PAGE_CONTAINER but I was copying the conditional from above that actually applies the LoggedIn and LoggedOut, then was like oh! :p

{xen:if {$visitor.user_id}, 'LoggedIn', 'LoggedOut'}
 
Top Bottom