I'm not sure what I'm doing wrong but I'm just trying to center this while still being able to deal with responsiveness.
Want to get all the divs centered but margin:auto doesn't work.. Probably missing something simple.
I have some images inside the colour divs and that's the part I am actually having trouble centering.
Here's a jsfiddle.
http://jsfiddle.net/clam22/38L6Y/22/
HTML is below
<div class="wrapper">
<div class="row">
<div id="red">
<img src="http://boringem.org/wp-content/uploads/2013/01/rock.jpg"/>
</div>
<img src="http://boringem.org/wp-content/uploads/2013/01/rock.jpg"/>
<div id="green">
</div>
<div id="blue">
<img src="http://boringem.org/wp-content/uploads/2013/01/rock.jpg"/>
</div>
</div>
</div>
Example CSS below
html,body {
background: #FFFFFF;
font-family: "Helvetica", "Arial", "Tahoma"; /* need font default set */
margin: 0 auto;
height: 100%;
width: 100%;
}
.wrapper {
max-width: 96%;
height: 100%;
width: 90%;
}
.row {
float:left;
margin: 0 auto;
width: 100%;
height: 30%;
}
#red {
background-color:red;
height:30%;
width: 30%;
float:left;
}
#green {
background-color:green;
height:30%;
width: 30%;
float:left;
}
#blue {
background-color:blue;
height:30%;
width: 30%;
float:left;
}