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

XF 1.3 display something only if from smartphone

Discussion in 'Styling and Customization Questions' started by jgas, Jun 26, 2014.

  1. jgas

    jgas Active Member


    I'd like to display some text/images/ads only if the user is using a smartphone, vertically.

    What kind of conditional should I use?

  2. Brogan

    Brogan XenForo Moderator Staff Member

  3. jgas

    jgas Active Member

    Thanks a lot brogan
  4. jgas

    jgas Active Member

    Good. I tried a few things and I can't see the error.
    My idea is to display some text/ads on the bottom of the smartphone screen.

    I tried this code on extra.css

    /*ADS MOBILE*/

    <xen:if is="@enableResponsive">
    @media (max-width:mad:maxResponsiveNarrowWidth) {
    #adsbottom {position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;}

    @media (max-width:mad:maxResponsiveMediumWidth) {
    #adsbottom {display:none}

    @media (@maxResponsiveWideWidth) {
    #adsbottom {display:none}

    /*ADS MOBILE*/

    and this on page_container

    <DIV id="adsbottom" style="background-color:#ffffff">test</div>

    But I can't see the "test" on the page or in the code.. what am I missing?

Share This Page