Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $nav-width: 380px;
- $mobile-width: 350px;
- $laptop-width: 1451px;
- //Mixins
- @mixin mobile {
- @media (min-width: #{$mobile-width}) and (max-width: #{$laptop-width - 1px}) {
- @content;
- }
- }
- @mixin laptop {
- @media (min-width: #{$laptop-width}) {
- @content;
- }
- }
- * {
- //outline: 1px solid red;
- }
- body {
- margin: 0;
- padding: 0;
- }
- .container {
- width: 1200px;
- height: auto;
- background-color: white;
- font-family: sans-serif;
- nav {
- width: 380px;
- height: 100%;
- display: inline-block;
- float: left;
- border-right: 2px solid white;
- overflow-y: scroll;
- position: fixed;
- .nav-inner {
- width: 80%;
- height: 100%;
- margin: 0px auto;
- header {
- padding-top: 50px;
- font-size: 28px;
- font-weight: bold;
- }
- ul {
- margin-top: 50px;
- padding: 0;
- display: block;
- list-style-type: none;
- a {
- display: block;
- text-decoration: none;
- margin: 40px auto;
- li {
- padding: 10px;
- border: 3px solid green;
- font-weight: bold;
- color: #1b5e20;
- &:hover {
- background-color: #1b5e20;
- color: white;
- }
- }
- }
- }
- }
- }
- main {
- width: 800px;
- display: inline-block;
- overflow-y: scroll;
- // position: relative;
- float: right;
- .main-inner {
- width: 85%;
- margin: 50px auto;
- .section {
- margin-bottom: 80px;
- padding-top: 10px;
- h2 {
- text-decoration: underline;
- color: #1b5e20;
- }
- }
- }
- }
- }
- @include mobile {
- .container {
- width: 100%;
- // height: 1200px;
- main,
- nav {
- width: 100%;
- display: block !important;
- position: relative;
- z-index: 1;
- }
- nav {
- height: 370px;
- background-color: white;
- border-bottom: 3px solid green;
- position: relative;
- z-index: 1;
- .nav-inner {
- width: 100%;
- header {
- text-align: center;
- }
- ul {
- margin: 10px auto;
- a {
- margin: 0 auto !important;
- text-align: center;
- text-decoration: underline !important;
- li {
- border: none !important;
- }
- }
- }
- }
- }
- main {
- height: 700px;
- overflow-y: scroll;
- }
- }
- }
- @include laptop {
- .container {
- width: 100%;
- main {
- width: 75%;
- }
- }
- }
Add Comment
Please, Sign In to add comment