Guest User

Untitled

a guest
Feb 21st, 2018
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.47 KB | None | 0 0
  1. $nav-width: 380px;
  2.  
  3. $mobile-width: 350px;
  4. $laptop-width: 1451px;
  5. //Mixins
  6. @mixin mobile {
  7. @media (min-width: #{$mobile-width}) and (max-width: #{$laptop-width - 1px}) {
  8. @content;
  9. }
  10. }
  11.  
  12. @mixin laptop {
  13. @media (min-width: #{$laptop-width}) {
  14. @content;
  15. }
  16. }
  17.  
  18. * {
  19. //outline: 1px solid red;
  20. }
  21.  
  22. body {
  23. margin: 0;
  24. padding: 0;
  25. }
  26.  
  27. .container {
  28. width: 1200px;
  29. height: auto;
  30. background-color: white;
  31. font-family: sans-serif;
  32. nav {
  33. width: 380px;
  34. height: 100%;
  35. display: inline-block;
  36. float: left;
  37. border-right: 2px solid white;
  38. overflow-y: scroll;
  39. position: fixed;
  40. .nav-inner {
  41. width: 80%;
  42. height: 100%;
  43. margin: 0px auto;
  44. header {
  45. padding-top: 50px;
  46. font-size: 28px;
  47. font-weight: bold;
  48. }
  49. ul {
  50. margin-top: 50px;
  51. padding: 0;
  52. display: block;
  53. list-style-type: none;
  54. a {
  55. display: block;
  56. text-decoration: none;
  57. margin: 40px auto;
  58. li {
  59. padding: 10px;
  60. border: 3px solid green;
  61. font-weight: bold;
  62. color: #1b5e20;
  63. &:hover {
  64. background-color: #1b5e20;
  65. color: white;
  66. }
  67. }
  68. }
  69. }
  70. }
  71. }
  72. main {
  73. width: 800px;
  74. display: inline-block;
  75. overflow-y: scroll;
  76. // position: relative;
  77. float: right;
  78. .main-inner {
  79. width: 85%;
  80. margin: 50px auto;
  81. .section {
  82. margin-bottom: 80px;
  83. padding-top: 10px;
  84. h2 {
  85. text-decoration: underline;
  86. color: #1b5e20;
  87. }
  88. }
  89. }
  90. }
  91. }
  92.  
  93. @include mobile {
  94. .container {
  95. width: 100%;
  96. // height: 1200px;
  97. main,
  98. nav {
  99. width: 100%;
  100. display: block !important;
  101. position: relative;
  102. z-index: 1;
  103. }
  104. nav {
  105. height: 370px;
  106. background-color: white;
  107. border-bottom: 3px solid green;
  108. position: relative;
  109. z-index: 1;
  110. .nav-inner {
  111. width: 100%;
  112. header {
  113. text-align: center;
  114. }
  115. ul {
  116. margin: 10px auto;
  117.  
  118. a {
  119. margin: 0 auto !important;
  120. text-align: center;
  121. text-decoration: underline !important;
  122. li {
  123. border: none !important;
  124. }
  125. }
  126. }
  127. }
  128. }
  129. main {
  130. height: 700px;
  131. overflow-y: scroll;
  132. }
  133. }
  134. }
  135.  
  136. @include laptop {
  137. .container {
  138. width: 100%;
  139. main {
  140. width: 75%;
  141. }
  142. }
  143. }
Add Comment
Please, Sign In to add comment