Skip to content

Instantly share code, notes, and snippets.

@marcolago
Forked from anonymous/dabblet.css
Created July 18, 2014 12:37
Show Gist options
  • Save marcolago/0eef8cf3939588a6d52d to your computer and use it in GitHub Desktop.
Save marcolago/0eef8cf3939588a6d52d to your computer and use it in GitHub Desktop.
2nd box Fluid with 1st, 3rd and 4th fixed width
/**
* 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);
}
<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>
// alert('Hello world!');
{"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