Skip to content

Instantly share code, notes, and snippets.

@michsch
Created May 30, 2012 18:02
Show Gist options
  • Save michsch/2837993 to your computer and use it in GitHub Desktop.
Save michsch/2837993 to your computer and use it in GitHub Desktop.
outer DIV to 100%
/**
* outer DIV to 100%
*/
html * { font-size:100%; }
body {
padding: 0;
margin: 0;
font-family: Arial, Helvetica, sans-serif;
font-size: 87.50%;
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
}
h1, h2, h3, h4, h5, h6 {
font-size: 125.00%;
line-height: 1em;
}
.wrapper {
width: 960px;
margin: 0 auto;
}
.wrapper .inner {
padding: 1em 10px;
}
.header, .main {
width: 100%;
margin: 0 0 1em;
background: rgba(0,0,0,.6);
color: white;
}
.header {
display: block;
}
.main {
display: table;
}
<div class="header" role="banner">
<div class="wrapper">
<div class="inner">
<h2>1. Versuch</h2>
<p>div.header ist display:block</p>
</div>
</div>
</div>
<div class="main" role="main">
<div class="wrapper">
<div class="inner">
<h2>2. Versuch</h2>
<p>div.header ist display:table</p>
</div>
</div>
</div>
{"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