I am experimenting with bootstrap and this is the code I wrote:
<!doctype html> <html lang="en"> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="./css/bootstrap.min.css"> <link rel="stylesheet" href="./css/bootstrap-theme.min.css"> <style type="text/css"> .row-centered { text-align:center; } .col-centered { display:inline-block; float:none; text-align:left; margin-right:-4px; } .pos{ position: relative; top: 240px; } </style> </head> <body> <div class="container"> <div class="row row-centered pos"> <div class="col-lg-8 col-centered"> <div class="well"></div> </div> <div class="col-lg-8 col-centered"> <div class="well"></div> </div> <div class="col-lg-8 col-centered"> <div class="well"></div> </div> </div> </div> </body> </html>
The output is as shown in the screenshot:
But when I switch to the mobile screen, I get the following:

I want divs to appear in the center with one over one on mobile screens. How can I do it? But he does not respond.
source share