bhalash

Ome new mobile CSS

Dec 15th, 2014
275
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 2.51 KB | None | 0 0
  1. @media only screen
  2.     and (min-device-width: 320px)
  3.     and (max-device-width: 736px)
  4.     and (orientation: portrait),
  5. only screen
  6.     and (min-device-width: 320px)
  7.     and (max-device-width: 736px)
  8.     and (orientation: landscape) {
  9.  
  10.     article img, nav, .entry-content, #branding, #cart-header-menu, #footer, #main {
  11.         /* Each of these items had padding that broke the page layout. */
  12.         box-sizing: border-box;
  13.     }
  14.  
  15.     h1 {
  16.         /* Given line height was must less than the font size. This caused text to
  17.         wrap vertically upon itself. */
  18.         line-height: 30px;
  19.     }
  20.  
  21.     #branding nav#access select {
  22.         /* Part of my drive to push content in from the edge. */
  23.         margin-left: 20px;
  24.     }
  25.  
  26.     hgroup, #main {
  27.         /* Header was pushed left off the screen. This centers it. */
  28.         padding: 0 20px;
  29.     }
  30.  
  31.     #below_footer p {
  32.         /* The centered text caused a word to wrap weirdly. */
  33.         text-align: left;
  34.     }
  35.  
  36.     .gallery {
  37.         /* This gallery would load on certain static pages and utterly break the layout. */
  38.         display: none;
  39.     }
  40.  
  41.     form, .related, .woocommerce, #content, #main {
  42.         /* The floated children were not properly cleared, which broke the width. */
  43.         overflow: auto;
  44.     }
  45.  
  46.     form:after, .related:after, .woocommerce:after, #content:after, #main {
  47.         clear: both;
  48.         content: '';
  49.         display: table;
  50.     }
  51.  
  52.     .full-width #content {
  53.         /* The top navigation menu has a fixed position, but inadequate bottom clearance. Site
  54.         items hide behind it. */
  55.         margin-top: 20px;
  56.     }
  57.  
  58.     .form-row-first, .form-row-last {
  59.         /* The float does not work on cellphone devices; it instead pushes one right and down. */
  60.         float: none;
  61.         margin-bottom: 10px;
  62.         width: 100%;
  63.     }
  64.  
  65.     .listing-item {
  66.         /* One section did not correctly space these. The result was that paragraph text was pushed to
  67.         one side by images. */
  68.         margin: 10px 0;
  69.     }
  70.  
  71.     article img {
  72.         /* There are several images with given widths great than that of the content or window on mobile
  73.         devices. This simply constrains them. */
  74.         display: block;
  75.         height: auto;
  76.         max-width: 100%;
  77.     }
  78.  
  79.     .slideshow_container {
  80.         /* The landing page slideshow hid other content, broke the width and height of the container, and
  81.         in some cases didn't even load content. */
  82.         display: none;
  83.     }
  84. }
Advertisement
Add Comment
Please, Sign In to add comment