Last active
August 29, 2015 13:56
-
-
Save exarcheia-web/8810790 to your computer and use it in GitHub Desktop.
Basic two-column (float) layout
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
| /* Basic two-column (float) layout */ | |
| * { | |
| box-sizing: border-box; | |
| } | |
| .section-main { | |
| width: 800px; | |
| margin: 40px auto; | |
| overflow: hidden; | |
| background: rgba(200,0,0,0.3); | |
| } | |
| .article-main { | |
| width: 500px; | |
| padding: 20px; | |
| } | |
| .aside-main { | |
| width: 300px; | |
| } | |
| .aside-main img { | |
| width: 100%; | |
| } | |
| .article-main, .aside-main { | |
| float: left; | |
| } | |
| @media (max-width: 750px) { | |
| .section-main { | |
| width: 600px; | |
| } | |
| .article-main, .aside-main { | |
| width: 300px; | |
| } | |
| } |
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
| <section class="section-main"> | |
| <article class="article-main"> | |
| <h2 class="page-title">My title</h2> | |
| <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ullam, totam blanditiis ex quaerat temporibus neque ad inventore aut nam ducimus.</p> | |
| </article> | |
| <aside class="aside-main"> | |
| <img src="http://placekitten.com/200/200"> | |
| <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ullam, totam blanditiis ex quaerat temporibus neque ad inventore aut nam ducimus.</p> | |
| </aside> | |
| </section> |
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
| // alert('Hello world!'); |
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
| {"view":"split","fontsize":"100","seethrough":"","prefixfree":"1","page":"css"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment