-
-
Save faroutchris/7127739 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| *, *:before, *:after { | |
| -moz-box-sizing: border-box; | |
| -webkit-box-sizing: border-box; | |
| box-sizing: border-box; | |
| } | |
| .cf:before, | |
| .cf:after { | |
| content: " "; /* 1 */ | |
| display: table; /* 2 */ | |
| } | |
| .cf:after {clear: both;} | |
| .container { | |
| width: 100%; | |
| position: relative; | |
| } | |
| body,html {background: white; height: 100%; margin: 0; padding: 0;} | |
| .grid { | |
| position: relative; | |
| float: left; | |
| transition: height; | |
| } | |
| .span1 { | |
| width: 100%; | |
| background: #f8f8f8; | |
| } | |
| .span1-2 { | |
| width: 50%; | |
| } | |
| .span1-3 { | |
| width: 33.333333333333333%; | |
| background: white | |
| } | |
| .people { | |
| background: #eee;} | |
| .dirt h2 { | |
| position: absolute; | |
| top: 35%; | |
| left: 20%; | |
| text-align: center; | |
| font-size: 182px; | |
| } | |
| header { | |
| background: url(http://unsplash.s3.amazonaws.com/batch%207/Top_view.jpg) center center no-repeat fixed; | |
| height: 100%; | |
| } | |
| footer { text-align: center;} | |
| /*mobile*/ | |
| @media only screen and (max-width: 730px) { | |
| .span1, .span1-2, .span1-3 { | |
| width: 100%; | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <script src="http://code.jquery.com/jquery-latest.js"></script> | |
| <meta charset=utf-8 /> | |
| <title>Create & Evolve - ALPHA 0.0.1</title> | |
| <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/2.1.3/normalize.min.css"> | |
| </head> | |
| <body> | |
| <header class="container cf"> | |
| <span class="logo">LOGO</span> | |
| <h1>Create & Evolve</h1> | |
| <p>A Graphic Design Agency in Stockholm, Sweden</p> | |
| </header> | |
| <div class="main container cf"> | |
| <div class="grid span1-2"> | |
| <h2>Personal</h2> | |
| </div> | |
| <div class="grid span1-2"> | |
| <h2>Professional</h2> | |
| </div> | |
| <div class="grid span1 dirt"> | |
| <div class="grid span1-2 people"> | |
| THE PEOPLE | |
| </div> | |
| <h2>THE DIRT</h2> | |
| </div> | |
| <div class="grid span1-2">Example Post</div> | |
| <div class="grid span1-2">Post Picture</div> | |
| <div class="grid span1"> | |
| Contact | |
| </div> | |
| </div> | |
| <footer> | |
| Copyright Create & Evolve 2013 | |
| </footer> | |
| </body> | |
| </html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $(document).ready(function() { | |
| var gridEl = $(".grid"); | |
| var resizeHeight = function() { | |
| gridEl.each(function(){ | |
| setHeight = Math.ceil($(this).outerWidth() / 2); | |
| $(this).css("height", setHeight + "px"); | |
| }); | |
| }; | |
| resizeHeight(); | |
| $(window).resize(function() { | |
| resizeHeight(); | |
| }); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment