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

user fields preference & change css

Discussion in 'Styling and Customization Questions' started by gaga, Nov 12, 2015.

  1. gaga

    gaga New Member

    Hi to all,
    I need help about change page width with user fields preference.

    I had created new fields in preference. checkbox.

    I want to hide banner when field is checked and change page width.
    Hide banner is done with template modification and below code
    Code:
    <xen:if is="{$visitor.customFields.hidebanner.on} != 'on' || !{$visitor.user_id}">
    <xen:include template="banner" />
    </xen:if>
    but i have problem with change .pageWidth
    I try with same code but not work

    Code:
    <xen:if is="{$visitor.customFields.hidebanner.on} != 'on' || !{$visitor.user_id}">
    .pageWidth
    {
    padding-left: 5px;
    }
    </xen:if>
    
    <xen:if is="{$visitor.customFields.hidebanner.on} == 'on'">
    .pageWidth
    {
    padding-left: 30px;
    }
    </xen:if>
    
    Any suggestion?

    Thanks a lot.
     
  2. kalco

    kalco Active Member

    In PAGE_CONTAINER
    below
    <!--XenForo_Require:CSS-->

    put

    Code:
    <xen:if is="{$visitor.customFields.hidebanner.on} != 'on' || !{$visitor.user_id}"><style>.pageWidth{padding-left: 5px;}</style></xen:if>
     
    gaga likes this.
  3. gaga

    gaga New Member

    work!
    Thanks
     

Share This Page