Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS How do i make the mobile version of my website display only on mobile phones?

  • This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #43286
    Anonymous
    Inactive

    how do i create a mobile version of my website that only shows in mobile phones.? i just want to know how i can adapt the version of my website to only mobile, i’m not talking about styling and code.

    #127674
    ChrisP
    Participant

    @Jarolin, if you’re talking about a completely different “mobile-version” of your site, rather than a responsively designed site, you’d create the site just like your desktop version, using css and html, create a mobile sub-domain (ie m.example.com), store your mobile version in the new subdomain, then use a redirect to detect if the users browser is mobile.

    Although there’s several different ways to redirect traffic, here’s a snippet provided on css-tricks https://css-tricks.com/snippets/javascript/redirect-mobile-devices/

    #127759
    SpeedyTechie
    Member

    Check out http://detectmobilebrowsers.com/
    It is super easy to use, it works well and it is available in whatever language you prefer: ASP, JQuery, JavaScript, PHP, and a bunch of others…

    #127782
    zdravo
    Member

    /* Smartphones (portrait and landscape)


    */
    @media only screen
    and (min-device-width : 320px)
    and (max-device-width : 480px) {
    /* Styles */
    }

    #127783
    CrocoDillon
    Participant

    That’s styling though, Jarolin said he wasn’t talking about that. Apart from that, I can image there are smartphones with smaller than 320px or bigger than 480px screens (for example iPhone 5 and Galaxy SIII)

Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘CSS’ is closed to new topics and replies.