Advertisement
Iyanyan

css web responsive

Oct 24th, 2019
237
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 3.44 KB | None | 0 0
  1. @import url(https://fonts.googleapis.com/css?family=Open+Sans:400,800,700,600,300);
  2.  
  3. body {
  4.     background: #eee;
  5.     margin:0;
  6.     font-family: 'Open Sans', sans-serif;
  7. }
  8.  
  9. hr {
  10.     border:0;
  11.     background:#dedede;
  12.     height:1px;
  13. }      
  14.  
  15. header{
  16.     text-align: center;
  17.     color: #232323;
  18. }
  19.  
  20. header .judul{
  21.     font-size: 17pt;
  22. }
  23.  
  24. header .deskripsi{
  25.     font-size: 11pt;
  26. }
  27.  
  28. .wrap {
  29.     width: 950px;
  30.     margin:25px auto;
  31. }
  32.  
  33. nav.menu ul {
  34.     overflow:hidden;
  35.     color:#fff;
  36.     list-style: none;
  37.     float:left;
  38.     padding:0;
  39.     width: 650px;
  40.     margin:0 0 0;
  41.     background: #00008B;
  42.     -webkit-box-shadow: 1px 1px 1px 0px rgba(204,204,204,0.55);
  43.     -moz-box-shadow: 1px 1px 1px 0px rgba(204,204,204,0.55);
  44.     box-shadow: 1px 1px 1px 0px rgba(204,204,204,0.55);
  45. }
  46.  
  47. nav.menu ul li {
  48.     margin:0;
  49.     float:left;
  50. }
  51.  
  52. nav.menu ul a {
  53.     padding:25px;
  54.     display:block;
  55.     font-weight:600;
  56.     font-size: 16px;
  57.     color:#fff;
  58.     text-transform: uppercase;
  59.     transition: all 0.5s ease;
  60.     text-decoration: none;
  61. }
  62.  
  63. nav.menu ul a:hover {
  64.     text-decoration: underline;
  65.     background:#16a085;
  66. }
  67.  
  68. .sidebar {
  69.     float:right;
  70.     width:275px;
  71. }
  72.  
  73. .sidebar .widget {
  74.     padding:25px;
  75.     margin:0 0 25px;
  76.     background:#fff;
  77.     border-bottom: 2px solid #fff;
  78.     transition: all 0.5s ease;
  79. }
  80.  
  81. .sidebar .widget:hover {
  82.     border-bottom: 2px solid #3498db;
  83. }
  84.  
  85. .sidebar .widget h2 {
  86.     padding:0;
  87.     margin:0 0 15px;
  88.     color:#3498db;
  89.     font-size: 18px;
  90.     font-weight:800;
  91.     text-transform: uppercase;
  92. }
  93.  
  94. .sidebar .widget p {
  95.     font-size: 14px;
  96. }
  97.  
  98. .sidebar .widget p:last-child {
  99.     margin:0;
  100. }
  101.  
  102. .blog {
  103.     float:left;
  104. }
  105.  
  106. .conteudo {
  107.     width:600px;
  108.     padding:25px;
  109.     margin:25px auto;
  110.     background: #fff;
  111.     border:1px solid #dedede;
  112.     -webkit-box-shadow: 1px 1px 1px 0px rgba(204,204,204,0.35);
  113.     -moz-box-shadow: 1px 1px 1px 0px rgba(204,204,204,0.35);
  114.     box-shadow: 1px 1px 1px 0px rgba(204,204,204,0.35);
  115. }
  116.  
  117. .conteudo img {
  118.     min-width: 650px;
  119.     margin:0 0 25px -25px;
  120.     max-width: 650px;
  121. }
  122.  
  123. .conteudo h1 {
  124.     padding:0;
  125.     margin:0 0 15px;
  126.     font-weight: normal;
  127.     color: #666;
  128.     font-family: Georgia;
  129. }
  130.  
  131. .conteudo p:last-child {
  132.     margin: 0;
  133. }
  134.  
  135. .conteudo .continue-lendo {
  136.     color:#000;
  137.     transition: all 0.5s ease;
  138.     text-decoration: none;
  139.     font-weight: 700;
  140. }
  141.  
  142. .conteudo .continue-lendo:hover {
  143.     margin-left:10px;
  144. }
  145.  
  146. .post-info {
  147.     float: right;
  148.     font-size: 12px;
  149.     margin: -10px 0 15px;
  150.     text-transform: uppercase;
  151. }
  152.  
  153. @media screen and (max-width: 960px) {
  154.  
  155.     .header {
  156.         position:inherit;
  157.     }
  158.  
  159.     .wrap {
  160.         width: 90%;
  161.         margin:25px auto;
  162.     }
  163.     .sidebar {
  164.         width:100%;
  165.         margin:25px 0 0;
  166.         float:right;
  167.     }
  168.  
  169.     .sidebar .widget {
  170.         padding:5%;
  171.     }
  172.  
  173.     nav.menu ul {
  174.         width: 100%;
  175.     }
  176.  
  177.     nav.menu ul {
  178.         float:inherit;
  179.     }
  180.  
  181.     nav.menu ul li {
  182.         float:inherit;
  183.         margin:0;
  184.     }
  185.  
  186.     nav.menu ul a {
  187.         padding:15px;
  188.         font-size: 16px;
  189.         border-top:1px solid #1abf9f;
  190.         border-bottom:1px solid #16a085;
  191.     }
  192.  
  193.     .blog {
  194.         width:90%;
  195.     }
  196.  
  197.     .conteudo {
  198.         float:inherit;
  199.         margin:0 auto 25px;
  200.         width:101%;
  201.         border:1px solid #dedede;
  202.         padding:5%;  
  203.         background: #fff;
  204.     }
  205.  
  206.     .conteudo img {
  207.         max-width: 110%;
  208.         margin:0 0 25px -5%;
  209.         min-width: 110%;
  210.     }
  211.  
  212.     .conteudo .continue-lendo:hover {
  213.         margin-left:0;
  214.     }
  215.  
  216.  
  217. }
  218.  
  219. @media screen and (max-width: 460px) {
  220.  
  221.     nav.menu ul a {
  222.         padding:15px;
  223.         font-size: 14px;
  224.     }
  225.  
  226.     .sidebar {
  227.         display:none
  228.     }
  229.     .post-info {
  230.         display:none;
  231.     }
  232.  
  233.     .conteudo {
  234.         margin:25px auto;
  235.     }
  236.  
  237.     .conteudo img {
  238.         margin:-5% 0 25px -5%;
  239.     }          
  240. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement