Background with more than 1 color - HTML CSS CSS Property

HTML CSS examples for CSS Property:background-color

Description

Background with more than 1 color

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">

body {   <!--   w  w  w.  ja  v  a 2 s  . c  om-->
   background: blue;
}
.container {
   height: 50px;
   background: gray;
}
.white {
   height: 50px;
   background: white;
   margin: 0 5%;
}


      </style> 
 </head> 
 <body> 
  <div class="container"> 
   <div class="white"></div> 
  </div>  
 </body>
</html>

Related Tutorials