vonko1988

SliceAndDice_ResponsiveDesign_homework_task1.css

Apr 12th, 2014
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 5.84 KB | None | 0 0
  1. body, div, header, h1, h2, h3, h4, h5, h6, footer, section, article, span, a, li, ul, img, p {
  2.     margin: 0;
  3.     padding: 0;
  4. }
  5.  
  6.     html, body, div#wrapper {
  7.         height: 100%;
  8.         min-height: 105%;
  9.     }
  10.  
  11. ul {
  12.     list-style-type: none;
  13. }
  14.  
  15. body div#wrapper {
  16.     width: 960px;
  17.     margin: 0 auto;
  18.     position: relative;
  19. }
  20.  
  21.     body div#wrapper > header {
  22.         padding: 25px;
  23.         border-bottom: 1px solid black;
  24.     }
  25.  
  26.         body div#wrapper > header h1 {
  27.             margin-left: 55px;
  28.             font-size: 2.5em;
  29.         }
  30.  
  31.             body div#wrapper > header h1 a {
  32.                 text-decoration: none;
  33.                 color: #999;
  34.             }
  35.  
  36.         body div#wrapper > header nav {
  37.             float: right;
  38.             margin-top: 5px;
  39.             zoom: 1;
  40.         }
  41.  
  42.             body div#wrapper > header nav:after {
  43.                 content: "";
  44.                 display: block;
  45.                 height: 0;
  46.                 clear: both;
  47.             }
  48.  
  49.             body div#wrapper > header nav ul li {
  50.                 display: inline-block;
  51.                 position: relative;
  52.                 margin-left: 10px;
  53.                 font-size: 1.3em;
  54.                 border: 1px solid black;
  55.                 border-radius: 15px;
  56.                 background: #fff;
  57.             }
  58.  
  59.                 body div#wrapper > header nav ul li a {
  60.                     display: inline-block;
  61.                     padding: 5px 15px;
  62.                     color: black;
  63.                     text-decoration: none;
  64.                 }
  65.  
  66.                 body div#wrapper > header nav ul li:hover {
  67.                     background: #aaa;
  68.                 }
  69.  
  70.                     body div#wrapper > header nav ul li:hover > a {
  71.                         text-decoration: underline;
  72.                     }
  73.  
  74.     body div#wrapper > section {
  75.         margin: 0 auto;
  76.     }
  77.  
  78.         body div#wrapper > section header .slider {
  79.             padding: 25px;
  80.         }
  81.  
  82.             body div#wrapper > section header .slider ul {
  83.                 width: 90%;
  84.                 margin: 0 auto;
  85.             }
  86.  
  87.                 body div#wrapper > section header .slider ul li {
  88.                     display: none;
  89.                 }
  90.  
  91.                     body div#wrapper > section header .slider ul li h2 {
  92.                         font-size: 1.5em;
  93.                     }
  94.  
  95.                     body div#wrapper > section header .slider ul li p {
  96.                         text-align: justify;
  97.                     }
  98.  
  99.                     body div#wrapper > section header .slider ul li.slider-current {
  100.                         display: block;
  101.                     }
  102.  
  103.             body div#wrapper > section header .slider .slider-controls {
  104.                 float: right;
  105.                 margin-right: 50px;
  106.             }
  107.  
  108.                 body div#wrapper > section header .slider .slider-controls a {
  109.                     text-decoration: none;
  110.                     color: black;
  111.                 }
  112.  
  113.                     body div#wrapper > section header .slider .slider-controls a:hover {
  114.                         text-decoration: underline;
  115.                     }
  116.  
  117.         body div#wrapper > section article {
  118.             margin: 0 auto;
  119.             width: 80%;
  120.             border: 1px solid black;
  121.             border-radius: 15px;
  122.             margin-bottom: 15px;
  123.             zoom: 1;
  124.         }
  125.  
  126.             body div#wrapper > section article:after {
  127.                 content: "";
  128.                 display: block;
  129.                 height: 0;
  130.                 clear: both;
  131.             }
  132.  
  133.             body div#wrapper > section article header {
  134.                 padding-top: 5px;
  135.                 padding-left: 5px;
  136.             }
  137.  
  138.             body div#wrapper > section article .article-content img {
  139.                 width: 70px;
  140.                 float: left;
  141.                 margin: 5px;
  142.             }
  143.  
  144.             body div#wrapper > section article .article-content p {
  145.                 text-align: justify;
  146.                 padding: 5px 15px;
  147.             }
  148.  
  149.     body div#wrapper > footer {
  150.         position: absolute;
  151.         bottom: 0;
  152.         width: 100%;
  153.         height: 60px;
  154.         margin: 0 auto;
  155.         padding-top: 15px;
  156.         border-top: 1px solid black;
  157.         text-align: center;
  158.     }
  159.  
  160.         body div#wrapper > footer h2 {
  161.             font-size: 1.7em;
  162.         }
  163.  
  164. /*Responsive design using media queries*/
  165.  
  166. @media only screen and (max-width:480px) {
  167.     body div#wrapper {
  168.         font-size: 0.8em;
  169.         width:100%;
  170.     }
  171.  
  172.             body div#wrapper > header {
  173.                 text-align: center;
  174.                 border: none;
  175.             }
  176.  
  177.                 body div#wrapper > header nav {
  178.                     float:none;
  179.                    margin-left:-25px;
  180.                    margin-bottom:5px;
  181.                     border: none;
  182.                 }
  183.  
  184.                 body div#wrapper > header nav ul {
  185.                     display:block;
  186.                     width:100%;
  187.                 }
  188.  
  189.                     body div#wrapper > header nav ul li {
  190.                         text-align:center;
  191.                         width: 100%;
  192.                     }
  193.  
  194.  
  195.             body div#wrapper section header {
  196.                 display: none;
  197.             }
  198.  
  199.             body div#wrapper > section article {
  200.                 width: 100%;
  201.                 border: none;
  202.                 border-radius: 0;
  203.                 border-bottom: 1px solid black;
  204.                 padding: 0;
  205.             }
  206.  
  207.                 body div#wrapper > section article header {
  208.                     display: block;
  209.                     text-align: center;
  210.                     font-size: 1.5em;
  211.                 }
  212.  
  213.  
  214.             body div#wrapper > footer {
  215.                 position:relative;
  216.                 border:none;
  217.             }
  218. }
Advertisement
Add Comment
Please, Sign In to add comment