• Hi,
    I want to have 2 css-files depending on what device the viewer has ,mobile/desktop .
    I have tried the Mobiledetect.net script but cannot get it to work.
    In what file should I put this? Tried functions.php but ends up with Error 500 when
    accessing the site.
    Can somebody please help with the full code I should use?

    Thank you.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • The fifth argument to wp_enqueue_style() is a @media query specifying when that stylesheet should be used:

    wp_enqueue_style( 'bazzze-mobile', path-to-mobile-stylesheet, null, null, 'screen and (max-width: 600px)' );

    Would that help?

    Thread Starter bazzze

    (@bazzze)

    Not really, I dont wont to identify it by screensize but with type of device.
    Mobile or desktop.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Mobile specific CSS’ is closed to new replies.