Created
April 19, 2016 12:37
-
-
Save cherring/d65111fe3a11a3e4dc2193de9beef45e to your computer and use it in GitHub Desktop.
This file contains 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> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"/> | |
<link rel="stylesheet" media="screen" href="style.css" /> | |
</head> | |
<body> | |
<br> | |
<div class="page-content"> | |
<div class="wrapper"> | |
<div class="first"> | |
I am a div that is first | |
</div> | |
<div class="second"> | |
I am a div that is second | |
</div> | |
</div> | |
</div> | |
</body> | |
</html> |
This file contains 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
* { | |
padding: 0; | |
margin: 0; | |
} | |
.wrapper { | |
width: 100%; | |
display: inline-block; | |
} | |
.first { | |
width: 49%; | |
background: green; | |
color: white; | |
display: inline-block; | |
@media screen and (max-width: 414px){ | |
width: 100%; | |
} | |
} | |
.second { | |
width: 49%; | |
background: blue; | |
color: white; | |
display: inline-block; | |
} | |
/* 414 just because it's the width of a 6(s)plus */ | |
@media screen and (max-width: 414px){ | |
.first { | |
display: inline-block; | |
width: 100%; | |
} | |
.second { | |
display: inline-block; | |
width: 100%; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment