Home > Software engineering >  Bootstrap 5 basic row test is not working
Bootstrap 5 basic row test is not working

Time:09-19

I barely started learning bootstrap and I'm facing this problem, Bootstrap 5 basic row doesn't seem to work like in the tutorial I'm learning from, Project structure:

index.html:

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <link rel="stylesheet" href="css/style.css" />
    <link rel="stylesheet" type="text/css" href="css/bootstrap.css" />
    <title>Test Document</title>
  </head>
  <body>
    <div >
      <div>test</div>
      <div>test2</div>
      <div>test3</div>
      <div>test4</div>
    </div>

    <script src="js/main.js"></script>
    <script src="js/jquery-3.6.1.min.js"></script>
    <script src="js/popper.min.js"></script>
    <script src="js/bootstrap.js"></script>
  </body>
</html>

the result I'm getting:

CodePudding user response:

Try this.

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <link rel="stylesheet" href="css/style.css" />
    <link rel="stylesheet" type="text/css" href="css/bootstrap.css" />
    <title>Test Document</title>
  </head>
  <body>
    <div >
        <div >
            <div >
              <span>test</span>
              <span>test2</span>
              <span>test3</span>
              <span>test4</span>
            </div>
        </div>
    </div>

    <script src="js/main.js"></script>
    <script src="js/jquery-3.6.1.min.js"></script>
    <script src="js/popper.min.js"></script>
    <script src="js/bootstrap.js"></script>
  </body>
</html>
  • Related