1. 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

Discussion in 'Styling and Customization Questions' started by akia, Mar 14, 2015.

  1. akia

    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?
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

    You would have to use a conditional statement for guests.
     
  3. Steve F

    Steve F Well-Known Member

    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.
     
    akia and Brogan like this.
  4. Brogan

    Brogan XenForo Moderator Staff Member

  5. Steve F

    Steve F Well-Known Member

    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'}
     

Share This Page