Align boxes to the same line - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:Box

Description

Align boxes to the same line

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">
.corpo {<!--   www  .  j av  a 2  s.  com-->
   font-family:'Roboto', sans-serif;
   height:401px;
   margin:201px 16px 31px 16px;
   text-align:center;
   display:flex;
}

.bloco {
   flex:2;
   display:inline-block;
   margin:16px 6% 16px 6%;
   width:301px;
   height:351px;
   border-style:solid;
   border-width:4px;
   border-color:Chartreuse;
}

.cabecalho-bloco {
   margin-bottom:11px;
   border-bottom-style:solid;
   border-width:3px;
   border-color:yellow;
}

input[type="file"] {
   display:none;
}

#file {
   font-weight:normal;
   box-shadow:2px 2px 5px 2px;
   color:blue;
   padding:6px;
   border-style:solid;
   border-width:2px;
}
</style> 
 </head> 
 <body> 
  <div class="corpo"> 
   <!-- Blocos --> 
   <div class="bloco"> 
    <div class="cabecalho-bloco"> 
     <h3 style="font-weight: bold;">Lorem ip</h3> 
    </div> 
    <div> 
     <form> 
      <br> 
      <br> 
      <a> <label id="file" for="selecao-arquivo">Lorem ipsum dolor </label> <input id="selecao-arquivo" type="file"> </a> 
      <br> 
      <br> 
      <input type="button" value="Baixar"> 
     </form> 
    </div> 
   </div> 
   <div class="bloco"> 
    <div class="cabecalho-bloco"> 
     <h3 style="font-weight: bold;">Lorem ip</h3> 
    </div> 
    <div> 
     <form> 
      <br> 
      <br> 
      <input type="text" placeholder="Produto"> 
      <br> 
      <br> 
      <input type="button" value="Consultar"> 
     </form> 
    </div> 
   </div> 
  </div> 
  <!-- Fim blocos -->  
 </body>
</html>

Related Tutorials