WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Alternate CSS for iPhone 4s (2 posts)

  1. bmorris110
    Member
    Posted 2 years ago #

    I need to have some alternate styles for the iPhone 4s.
    But I can't figure out how.

    fugostudios.com

    I tried this code, but it doesn't seem to affect anything.

    <link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'stylesheet_url' ); ?>" />
    
    <link rel="stylesheet" href="<?php bloginfo('url'); ?>/style_mobile.css"
    media="only screen and (min-device-width : 320px) and (max-device-width : 480px)"> 
    
    <link rel="stylesheet" href="<?php bloginfo('url'); ?>/style_mobile.css"
    media="only screen and (min-width : 321px)"> 
    
    <link rel="stylesheet" href="<?php bloginfo('url'); ?>/style_mobile.css"
    media="only screen and (max-width : 320px)"> 
    
    <link rel="stylesheet" href="<?php bloginfo('url'); ?>/style_ipad.css"
    media="only screen and (min-device-width : 768px) and (max-device-width : 1024px)"> 
    
    <link rel="stylesheet" href="<?php bloginfo('url'); ?>/style_ipad.css"
    media="only screen and (min-device-width : 768px) and (max-device-width : 1024px) and (orientation : landscape)"> 
    
    <link rel="stylesheet" href="<?php bloginfo('url'); ?>/style_ipad.css"
    media="only screen and (min-device-width : 768px) and (max-device-width : 1024px) and (orientation : portrait)"> 
    
    <link rel="stylesheet" href="<?php bloginfo('url'); ?>/style_mobile.css"
    media="only screen and (-webkit-min-device-pixel-ratio : 1.5), only screen and (min-device-pixel-ratio : 1.5)">
  2. bmorris110
    Member
    Posted 2 years ago #

    it was a super cache plugin issue, downloaded mobile packs plugin and set the mobile theme to same theme, works now. i kept the above code in the theme too.

Topic Closed

This topic has been closed to new replies.

About this Topic