Align and center two divs and two headers - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Header

Description

Align and center two divs and two headers

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">
.k-legend-title {
   color:Chartreuse;
   text-align:center;
}

.k-stat-title-color-box {
   display:inline-block;
   width:11px;
   height:11px;
   border-radius:26px;
   background:yellow;
   margin-top:7px;
   margin-right:6px;
   margin-left:0%;
}

h4 {<!--   w w  w.  j a v a 2  s.c o  m-->
   display:inline-block;
}

h4:first-of-type {
   margin-right:16px;
}
</style> 
 </head> 
 <body> 
  <div class="k-legend-title"> 
   <div class="k-stat-title-color-box" style="background-color: #3DA1ED;"></div> 
   <h4 class="">Driver 1</h4> 
   <div class="k-stat-title-color-box" style="background-color: #652D91;"></div> 
   <h4 class="">Driver 2</h4> 
  </div>  
 </body>
</html>

Related Tutorials