Source Code:
(back to article)
Submit
Result:
Report an issue
<!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"> <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha384-HSMxcRTRxnN+Bdg0JdbxYKrThecOKuH5zCYotlSAcp1+c8xmyTe9GYg1l9a69psu" crossorigin="anonymous"> <style> body { background: transparent; } .vcenter { display: inline-block; vertical-align: middle; float: none; max-width: 49%; } .big-box { height: 8em; border: 1px solid purple; background: red; } .small-box { height: 2em; border: 1px solid green; background: green; } </style> </head> <body> <div class="container"> <div class="row"> <div class="col-xs-6 vcenter"> <div class="big-box">Big</div> </div> <div class="col-xs-6 vcenter"> <div class="small-box">Small</div> </div> </div> </div> </body> </html>