Set background to red - HTML CSS CSS Property

HTML CSS examples for CSS Property:background

Description

Set background to red

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <style id="compiled-css" type="text/css">

.clear{clear:both;}
.main {<!--from www.  j a  v a  2 s  .  c  om-->
   text-align: center;
}
.footer {
   background: red;
   clear: both;
}
.footer ul {
   float: right;
}
.footer li {
   display: inline;
}
.footer p {
   float: left;
}


      </style> 
 </head> 
 <body> 
  <div class="main">
    Lorem ipsum dolor. 
  </div> 
  <div class="footer"> 
   <p>More lorem.</p> 
   <ul> 
    <li>One</li> 
    <li>Two</li> 
    <li>Three</li> 
   </ul> 
   <div class="clear"></div> 
  </div>  
 </body>
</html>

Related Tutorials