Create full-width header using table properties - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Table Width

Description

Create full-width header using table properties

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">
.wrap {<!--from  w  w w  . j ava2 s .co m-->
   width:301px;
   display:flex;
   flex-wrap:wrap;
}

.header {
   flex:0 0 100%;
   background-color:Chartreuse;
}

.first {
   flex:2 0 34.34%;
   background:orangered;
}

.second {
   flex:2 0 34.34%;
   background:lightgreen;
}

.third {
   flex:2 0 34.34%;
   background:aqua;
}

.wrap>* {
   padding:11px;
   box-sizing:border-box;
}
</style> 
 </head> 
 <body> 
  <div class="wrap"> 
   <span class="header">Lorem </span> 
   <span class="first">Lorem</span> 
   <span class="second">Lorem </span> 
   <span class="third">Lorem</span> 
  </div>  
 </body>
</html>

Related Tutorials