xF1 Show or hide a template or content based on browser viewport width

  • Downloading from our site will require you to have a paid membership. Upgrade to a Premium Membership today!

    Dont forget read our Rules! Also anyone caught Sharing this content will be banned. By using this site you are agreeing to our rules so read them. Saying I did not know is simply not an excuse! You have been warned.

Radio

    ven0m

    Administrator
    Staff member
    Administrator
    Moderator
    Platinum
    xenForo 2.x.x
    xenForo 1.x.x
    Contributor
    vBulletin All Access Pass
    The Chest
    Verified
    Ultra Platinum VIP
    Platinum VIP
    Gold VIP
    Silver VIP
    Premium
    Member
    Jul 17, 2005
    20,466
    7,708
    321
    localhost
    Heisenberg submitted a new resource:

    - A guide on how to show or hide a template or even content to a mobile device or small browser widths

    Didn't see this listed as a guide already, so wanted to share a guide on how to show or hide a template or even content to a mobile device.

    First to display a template for mobile only, open the template you want to include the content in and place this code where you want to display the template you want to call to.

    Code:
    <div class="XFmobileShow">
    <xen:include template=" Template To Show Only On Mobile " />
    </div>

    If you rather just show content direct, rather then call to a...

     
    Thread starter Similar threads Forum Replies Date
    ven0m xF1 Show message (notice) when creating thread in a specific forum. Tips & Guides 0
    luigi86 xF1 Hide Posts From Guests Tips & Guides 5