HTML Element Style How to - Fill background of aligned blocks


We would like to know how to fill background of aligned blocks.


<!DOCTYPE html>
<style type='text/css'>
.clearfix:before, .clearfix:after {<!--  www.j  a v a2s .c om-->
  content: ".";
  display: block;
  height: 0;
  overflow: hidden;


.clearfix:after {
  clear: both;

.clearfix {
  zoom: 1;
  background-color: Aqua;
} /* IE < 8 */
  <div class="clearfix">
    <div style="float: left">left</div>
    <div style="float: right">right</div>

The code above is rendered as follows: