Align 3 DIV side by side - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:Div Align

Description

Align 3 DIV side by side

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 {<!--  ww  w  . ja  v  a  2s . co  m-->
   padding:0;
   margin:0;
   font-family:Arial, sans-serif;
   font-size:15px;
   color:Chartreuse;
}

p {
   line-height:2.66em;
   margin:0 0 2em 0;
}

h1, h2, h3, h4, h5, h6 {
   margin:0 0 2em 0;
   font-weight:normal;
}

#buttoncointainer {
   width:100%;
}

.buttontext {
   font-size:176%;
   font:yellow;
}

#arrowleft {
   float:left;
   width:21%;
   height:41px;
   background:blue;
   border:2px solid pink;
   margin-right:4px;
   position:relative;
   float:left;
}

#arrowleft:hover {
   float:left;
   width:21%;
   height:41px;
   background:WhiteSmoke;
}

.leftarrow {
   float:left;
   width:100%;
   display:table-cell;
   vertical-align:middle;
   text-align:center;
   height:41px;
   float:left;
}

.leftarrow a:hover {
   color:OrangeRed;
}

.leftarrow a {
   text-decoration:none;
   color:grey;
}

#sharebutton {
   float:left;
   width:41%;
   margin:0 auto;
   text-align:center;
   background:BlueViolet;
   height:41px;
   border:2px solid Chartreuse;
}

#sharebutton:hover {
   width:41%;
   text-align:center;
   background:yellow;
   height:41px;
}

.fb-share-text {
   color:blue;
   text-align:center;
}

.sbutton {
   margin:0 auto;
}

.sbutton a {
   text-decoration:none;
   display:block
}

.sbutton a:hover {
   text-decoration:none;
   display:block;
   color:pink;
}

#arrowright {
   float:right;
   width:21%;
   height:41px;
   background:WhiteSmoke;
   border:2px solid OrangeRed;
   margin-left:4px;
   position:relative;
   float:left;
}

#arrowright:hover {
   float:left;
   width:21%;
   height:41px;
   background:grey;
}

.rightarrow {
   float:right;
   width:100%;
   display:table-cell;
   vertical-align:middle;
   text-align:center;
   height:41px;
}

.rightarrow a:hover {
   color:BlueViolet;
}

.rightarrow a {
   text-decoration:none;
   color:Chartreuse;
}
</style> 
 </head> 
 <body> 
  <div id="buttoncointainer"> 
   <div id="arrowleft"> 
    <div class="leftarrow"> 
     <p class="buttontext"> test </p> 
    </div> 
   </div> 
   <div id="sharebutton"> 
    <div class="sbutton"> 
     <p class="buttontext"> Share </p> 
    </div> 
   </div> 
   <div id="arrowright"> 
    <div class="rightarrow"> 
     <p class="buttontext"> right </p> 
    </div> 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials