Media Queries Practice HTML/CSS-Answers

HTML

<div id="content">

<section class="one">

<h2>Example #1</h2>

<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec ultrices dui sed dui congue vulputate. Integer quis dictum diam, vel viverra erat. Integer bibendum elementum velit, vel malesuada felis scelerisque at. Donec orci leo, laoreet vel orci et, molestie tempus lectus. Sed et elit urna. Suspendisse eget fermentum elit. Praesent malesuada feugiat diam, non blandit enim ultrices in. Mauris at volutpat erat.</p>

</section>

<section class="two">

<h2>Example #2</h2>

<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec ultrices dui sed dui congue vulputate. Integer quis dictum diam, vel viverra erat. Integer bibendum elementum velit, vel malesuada felis scelerisque at. Donec orci leo, laoreet vel orci et, molestie tempus lectus. Sed et elit urna. Suspendisse eget fermentum elit. Praesent malesuada feugiat diam, non blandit enim ultrices in. Mauris at volutpat erat.</p>

</section>

CSS

header {

width:100%;

height:120px;

background:#FFFFFF;

}

#content{

width:1024px;

margin: 0 auto;

overflow: auto;

padding-bottom:60px;

padding-top:60px;

}

body {

background-color:#8E8989;

font-family:Gotham, "Helvetica Neue", Helvetica, Arial, sans-serif;

}

.one {

background:#FFFFFF;

float:left;

width:500px;

height:auto;

}

.two {

background:#FFFFFF;

float:left;

width:500px;

height:auto;

}

p {

min-width:200px;

max-width:500px;

margin:0 auto;

padding:50px;

}

h2 {

text-align:center;

}

@media only screen and (max-width: 960px){

body {

background-color:#187082;

}

}

@media only screen and (max-width: 750px){

body {

background-color:#057233;

}

#content {

width:750px;

margin: 0 auto;

overflow: auto;

padding-bottom:60px;

padding-top:60px;

}

.one, .two {

height:auto;

width:45%;

margin: 0 auto;

margin-top:30px;

}

p {

margin:0 auto;

width:20%;

min-width:220px;

}

}

@media only screen and (max-width: 320px){

body {

background-color:#8A0D0F;

}

#content {

width:310px;

margin: 0 auto;

overflow: auto;

padding-bottom:20px;

padding-top:20px;

}

.one, .two {

float:none;

height:auto;

width:70%;

margin: 0 auto;

margin-top:30px;

}

p {

margin:0 auto;

width:10%;

min-width:120px;

font-size:12px;

}

}