doralchan
doralchan

Reputation: 13

Bootstrap Scaffolding Span

Super beginner at this but I'm having Bootstrap issues that I can't find answers to online. The spans I've created don't break into parts of 12. They all appear to be uniform but I know I've installed this correctly because I was able to create buttons earlier. Help! What am I doing wrong?

<!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">
<title>Scaffolding: Fixed</title>

<!-- Bootstrap -->
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css">
<style>
    .span12{
        background: black;
        color: white;
        padding: 20px 0;
        text-align: center;
    }
    .span6{
        background: blue;
        color: white;
        padding: 20px 0;
        text-align: center;
        margin-top: 15px;
    }
    .span3{
        background: purple;
        color: white;
        padding: 20px 0;
        text-align: center;
        margin-top: 15px;
    }
</style>
</head>

<body>

  <div class = "container">
    <div class = "row">
      <div class = "span12">Span12</div>
    </div>
    <div class = "row">
      <div class = "span6">Span6</div>
      <div class = "span6">Span6</div>
    </div>
    <div class = "row">
      <div class = "offset 2 span3">Span3</div>
      <div class = "span3">Span3</div>
      <div class = "span3">Span3</div>
      <div class = "span3">Span3</div>
    </div>
  </div>

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"> </script>
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>

</body>
</html>

Upvotes: 1

Views: 455

Answers (1)

Manish Mahajan
Manish Mahajan

Reputation: 1166

I think you are using Bootstrap 3 and in latest version of bootstrap there are no span classes for grid system. Use following instead:

<div class="row">
  <div class="col-lg-12">col-lg-12</div>
</div>

Upvotes: 2

Related Questions