isleshocky77

Css for different mobile phones

Mar 12th, 2011
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 2.48 KB | None | 0 0
  1. @media
  2. screen and (-webkit-min-device-pixel-ratio:0),        /* iPhone */
  3. only screen and (-webkit-min-device-pixel-ratio: 2),  /* iPhone4 */
  4. only screen and (max-device-width: 1024px),           /* Android - Hdpi */
  5. screen and (-webkit-device-pixel-ratio: 1.5),         /* Android - Hdpi */
  6. screen and (-webkit-device-pixel-ratio: 1.0),         /* Android - Mdpi */
  7. screen and (-webkit-device-pixel-ratio: 0.75)         /* Android - Ldpi */
  8. {
  9.   /***********************/
  10.   /* Register            */
  11.   /***********************/
  12.   .account_register #header {
  13.     width: 100%;
  14.   }
  15.  
  16.   .account_register #header_search {
  17.     width: 200px;
  18.   }
  19.  
  20.   .account_register #header_search label {
  21.     display: none;
  22.   }
  23.  
  24.   .account_register #header_search input.text {
  25.     width: 150px;
  26.   }
  27.  
  28.   .account_register .columns.layout_4 .column_1 {
  29.     margin: 0;
  30.     width: 100%;
  31.   }
  32.  
  33.   .account_register .column_2 {
  34.     display: none;
  35.   }
  36. }
  37.  
  38. /************************************/
  39. /*          Device Specific         */
  40. /************************************/
  41.  
  42. /**** iPhone ************************/
  43. @media screen and (-webkit-min-device-pixel-ratio:0) {
  44. }
  45.  
  46. /**** iPhone4 ***********************/
  47. @media only screen and (-webkit-min-device-pixel-ratio: 2) {
  48. }
  49.  
  50. /**** iPad **************************/
  51. @media only screen and (max-device-width: 1024px) {
  52. }
  53.  
  54. /**** Android - Hdpi ****************/
  55. @media screen and (-webkit-device-pixel-ratio: 1.5) {
  56. }
  57.  
  58. /**** Android - Mdpi ****************/
  59. @media screen and (-webkit-device-pixel-ratio: 1.0) {
  60. }
  61.  
  62. /**** Android - Ldpi ****************/
  63. @media screen and (-webkit-device-pixel-ratio: 0.75) {
  64. }
  65.  
  66.  
  67. /************************************/
  68. /*     Orientation Specific         */
  69. /************************************/
  70.  
  71. /**** Landscape ****************/
  72. @media only screen and (max-width: 480px) and (orientation: landscape) {
  73. }
  74.  
  75. /**** Portrait  ****************/
  76. @media only screen and (max-width: 480px) and (orientation: portrait) {
  77.   .account_register #header .logo {
  78.     float: none;
  79.   }
  80.  
  81.   .account_register #header_search {
  82.     display: block;
  83.     float: none;
  84.     margin: 0.5em 0;
  85.     position: static;
  86.     width: 210px;
  87.   }
  88.  
  89.   .account_register #header_search label {
  90.     display: none;
  91.   }
  92.  
  93.   .account_register #header_search input.text {
  94.     width: 165px;
  95.   }
  96.  
  97.   .account_register #header .nav {
  98.     float: none;
  99.     position: static;
  100.   }
  101.  
  102.   .account_register #footer ul {
  103.     margin-right: 3em;
  104.   }
  105. }
Advertisement
Add Comment
Please, Sign In to add comment