-
-
Save marcolago/0eef8cf3939588a6d52d to your computer and use it in GitHub Desktop.
2nd box Fluid with 1st, 3rd and 4th fixed width
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
/** | |
* 2nd box Fluid with 1st, 3rd and 4th fixed width | |
*/ | |
.box { | |
float: left; | |
box-sizing: border-box; | |
border: 1px solid black; | |
} | |
.inner { | |
margin: 1em; | |
background-color: rgba(0,0,0,0.05); | |
} | |
.box--non-fluid { | |
width: 300px; | |
min-height: 300px; | |
background-color: rgba(0,255,0,0.5);; | |
} | |
.box--non-fluid:first-child { | |
position: absolute; | |
} | |
.box--fluid { | |
width: 100%; | |
min-height: 300px; | |
margin-right: -600px; | |
padding-left: 300px; | |
padding-right: 600px; | |
background-color: rgba(255,255,0,0.5); | |
} |
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
<div class="box box--non-fluid"><div class="inner">non-Fluid</div></div> | |
<div class="box box--fluid"><div class="inner">Fluid</div></div> | |
<div class="box box--non-fluid"><div class="inner">non-Fluid</div></div> | |
<div class="box box--non-fluid"><div class="inner">non-Fluid</div></div> |
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
// alert('Hello world!'); |
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
{"view":"split","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment