Flexbox: center horizontally and vertically

I think you want something like the following. html, body { height: 100%; } body { margin: 0; } .flex-container { height: 100%; padding: 0; margin: 0; display: flex; align-items: center; justify-content: center; } .row { width: auto; border: 1px solid blue; } .flex-item { background-color: tomato; padding: 5px; width: 20px; height: 20px; margin: 10px; … Read more

How to place elements like this

Try this .bigger { height: 300px !important; } .smaller { height: 99px !important; margin-bottom: 2px; } <link rel=”stylesheet” href=”https://stackpath.bootstrapcdn.com/bootstrap/4.1.2/css/bootstrap.min.css” integrity=”sha384-Smlep5jCw/wG7hdkwQ/Z5nLIefveQRIY9nfy6xoR1uRYBtpZgI6339F5dgvm/e9B” crossorigin=”anonymous”> <div class=”container-fluid”> <div class=”row main”> <div class=”col-sm-6″> <div class=”col-sm-12″><p> 1 Lorem ipsum dolor sit amet, consectetur adipisicing elit. Error nihil consequuntur itaque placeat est voluptates, temporibus iste nesciunt dignissimos excepturi. </p> </div> <div class=”col-sm-12″> … Read more