I am attempting to create multi color backgrounds.
I want the entire background to be blue with red sections in certain containers. I want the red to go all the way from side to side of the page without any white spaces that may be rendered by the browser. Here is what I have:
HTML:
<div class="Blue">
Here is one color
</div>
<div class="Red">
Here is one color
</div>
<div class="Blue">
Here is one color
</div>
<div class="Red">
Here is one color
</div>
CSS:
.Blue {
width:100%; /* I want the width of the background to be 100% of the page ?*/
height: 30%; /* I want the height of the background container to be 30% of the page? */
background-color: blue;
}
.Red {
width:100%;
height: 30%; /*The next 30% of the page ? */
background-color: red;
}
http://jsfiddle.net/4DXDX/ The edges are offset with a white margin on the sides.
How do I get the color to go all the way from edge to edge? Is putting the appropriate colors in a div tag the right/ or efficient way to do this?
Below is an image of the background i want to create.