• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.4 Wider sidebar for Guests

akia

Well-known member
#1
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?
 

Steve F

Well-known member
#3
There is a class for users, LoggedIn and LoggedOut that you can use in CSS.

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.
 

Steve F

Well-known member
#5
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'}