Align three div objects in HTML/CSS vertically - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:Div Align

Description

Align three div objects in HTML/CSS vertically

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <link rel="stylesheet" type="text/css" href="stylesheet.css"> 
  <title>Cats</title> 
 </head> <!--  w ww .  ja va 2s. com-->
 <body> 
  <div class="box-wrap"> 
   <div id="cat1"> 
    <img src="https://www.java2s.com/style/demo/Opera.png"> 
   </div> 
   <div id="cat3"> 
    <img src="https://www.java2s.com/style/demo/Google-Chrome.png"> 
   </div> 
  </div> 
  <div class="text-center"> 
   <div id="cat2"> 
    <img src="https://www.java2s.com/style/demo/Opera.png"> 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials