Advertisement
makispaiktis

Codecademy - 18th Course (CSS Example)

Oct 23rd, 2019 (edited)
431
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 2.35 KB | None | 0 0
  1. html,
  2. body {
  3.   max-width: 1200px;
  4.   margin: auto;
  5.   font-family: "Space Mono", sans-serif;
  6.   font-size: 18px;
  7.   line-height: 1.4em;
  8.   color: GhostWhite;
  9. }
  10.  
  11. body {
  12.   background-image: url("../img/space.jpg");
  13.   height: 100%;
  14.   background-attachment: fixed;
  15.   background-size: cover;
  16. }
  17.  
  18. .clearfix {
  19.   clear: both;
  20. }
  21.  
  22. /* Title and Description */
  23.  
  24. .page-title {
  25.   text-align: center;
  26.   margin: auto;
  27.   line-height: 2em;
  28. }
  29.  
  30. .logo {
  31.   height: 80px;
  32.   width: 80px;
  33.   background-image: url("../img/spaceship.png");
  34.   background-size: contain;
  35.   background-repeat: no-repeat;
  36.   display: inline-block;
  37.   position: relative;
  38.   top: 1em;
  39. }
  40.  
  41. .page-title h1 {
  42.   display: inline-block;
  43. }
  44.  
  45. .main {
  46.   text-align: center;
  47. }
  48.  
  49. .page-description {
  50.   font-size: 0.8rem;
  51.   padding: 30px;
  52. }
  53.  
  54. .learn-more {
  55.   color: DarkOrange;
  56.   text-decoration: none;
  57.   display: block;
  58.   margin: 25px 0 0 0;
  59.   font-weight: bold;
  60. }
  61.  
  62. /* Gallery */
  63.  
  64. .gallery {
  65.   display: flex;
  66.   flex-wrap: wrap;
  67.   justify-content: center;
  68.   margin-top: 20px;
  69. }
  70.  
  71. .gallery-item {
  72.   margin: 20px;
  73. }
  74.  
  75. .gallery-item .thumbnail {
  76.   width: 240px;
  77.   border: 2px solid GhostWhite;
  78.   border-radius: 4px;
  79. }
  80.  
  81. /* Footer Navigation */
  82.  
  83. nav {
  84.   margin-top: 30px;
  85. }
  86.  
  87. nav ul {
  88.   display: block;
  89. }
  90.  
  91. nav li {
  92.   display: inline;
  93.   margin: 0 20px 0 0;
  94.   color: GhostWhite;
  95. }
  96.  
  97. nav a {
  98.   line-height: 60px;
  99.   border: 1px solid GhostWhite;
  100.   padding: 7px;
  101.   border-radius: 4px;
  102.   color: DarkOrange;
  103.   text-decoration: none;
  104. }
  105.  
  106. .contact-btn {
  107.   cursor: pointer;
  108.   margin: 20px 30px;
  109.   text-align: center;
  110. }
  111.  
  112. .contact-btn a:active {
  113.   position: relative;
  114.   bottom: 2px;
  115. }
  116.  
  117. @media only screen and (max-width: 480px){
  118.   .page-title{
  119.     width: 270px;
  120.   }
  121. }
  122.  
  123. @media only screen and (min-width:320px) and (max-width:480px), (orientation: portrait){
  124.   .gallery-item .thumbnail{
  125.     width: 95%;
  126.   }
  127. }
  128.  
  129. @media only screen and (min-resolution: 90dpi){
  130.   .logo{
  131.     background-image: url("../img/spaceship@2x.png");
  132.   }
  133. }
  134.  
  135. @media only screen and (max-resolution:150dpi) and (max-width:480px){
  136.   .page-description{
  137.     font-size: 20px;
  138.   }
  139. }
  140.  
  141. @media only screen and (min-width: 768px) and (max-width: 1024px) and (orientation: landscape){
  142.   .page-title, .page-description {
  143.   float: left;
  144.     width: 20em;
  145. }
  146.  
  147. .page-description {
  148.     text-align: left;
  149. }
  150. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement