Last active
March 28, 2016 14:58
-
-
Save esnya/033b1a575087dd8d017f to your computer and use it in GitHub Desktop.
Responsive design (?) by CSS flex-box
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 lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>Flex Responsive</title> | |
| <style> | |
| html, body, .container { | |
| margin: 0; | |
| padding: 0; | |
| width: 100%; | |
| min-width: 216px; | |
| } | |
| .row { | |
| display: flex; | |
| flex-wrap: wrap; | |
| width: 100%; | |
| } | |
| .col { | |
| flex: 1 0 200px; | |
| margin: 8px; | |
| border: 1px solid #000; | |
| background: #aaa; | |
| } | |
| </style> | |
| </head> | |
| <body> | |
| <div class="container"> | |
| <div class="row"> | |
| <div class="col">A<br>A</div> | |
| <div class="col">B</div> | |
| <div class="col">C</div> | |
| <div class="col" style="flex: 1 0 300px;">D<br>D</div> | |
| </div> | |
| </div> | |
| </body> | |
| </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment