(6/5) Jumbotron text all on one line


#1


https://www.codecademy.com/en/courses/make-a-website/lessons/bootstrap/exercises/jumbotron

The three elements, h2, h3 and a are not going to a new line like they are supposed to and are all staying in one line. I even copy and pasted the code and nothing changed


<!DOCTYPE html>
<html>
<head>
  <title>Skillfair</title>
  <meta charset="utf-8"/>
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
  <link href='https://fonts.googleapis.com/css?family=Roboto:300,400,700' rel='stylesheet' type='text/css'>
  <link rel="stylesheet" type="text/css" href="main.css">
</head>
<body>
	<header class="container">
		<div class="row">
      <h1 class="col-sm-4">
        Skillfair
      </h1>
      <nav class="col-sm-8 text-right">
        <p>newest</p>
        <p>catalogue</p>
        <p>contact</p>
      </nav>
    </div>
	<section class="jumbotron">
  	<div class="container">
    	<div class="row text-center">
      	<h2>Homemade Goods</h2>
      	<h3>This Year's Best</h3>
      	<a class="btn btn-primary" href="#" role="button">See all</a>
    	</div>
  	</div>
	</section>
          <section class="container">
      	<div class="row">
          <figure class="col-sm-6">
          	<p>kitchen</p>
            <img src="https://s3.amazonaws.com/codecademy-content/projects/make-a-website/lesson-4/kitchen.jpg"/>
          </figure>
          <figure class="col-sm-6">
          	<p>woodwork</p>
            <img src="https://s3.amazonaws.com/codecademy-content/projects/make-a-website/lesson-4/woodwork.jpg"/>
          </figure>
        </div>
        <div class="row">
          <figure class="col-sm-6">
          	<p>gifts</p>
            <img src="https://s3.amazonaws.com/codecademy-content/projects/make-a-website/lesson-4/gifts.jpg"/>
          </figure>
          <figure class="col-sm-6">
          	<p>antiques</p>
            <img src="https://s3.amazonaws.com/codecademy-content/projects/make-a-website/lesson-4/antique.jpg"/>
          </figure>
        </div>
      </section>
    	<footer class="container">
    		<div class="row">
          <p class="col-sm-4">
            &copy; 2016 Skillfair
          </p>
          <ul class="col-sm-8">
            <li class="col-sm-1"><img src="https://s3.amazonaws.com/codecademy-content/projects/make-a-website/lesson-4/twitter.svg">
</li>
            <li class="col-sm-1"><img src="https://s3.amazonaws.com/codecademy-content/projects/make-a-website/lesson-4/facebook.svg">
</li>
            <li class="col-sm-1">
  <img src="https://s3.amazonaws.com/codecademy-content/projects/make-a-website/lesson-4/instagram.svg">
</li>
            <li class="col-sm-1">
  <img src="https://s3.amazonaws.com/codecademy-content/projects/make-a-website/lesson-4/medium.svg">
</li>
          </ul>
        </div>
    </footer>
  </header>
</body>
</html>


#2

@designrunner64333,
You have defined those 2 to be on the same row

<div class="row text-center">
<h2>Homemade Goods</h2>
<h3>This Year's Best</h3>
<a class="btn btn-primary" href="#" role="button">See all</a>
</div>


#3

Thanks for your reply, that's how the tutorial says to write it (You can see the snippet in the original image). I tried something a little different that kind of worked but now the text is not centered.

<section class="jumbotron">
  <div class="container">
    <div class="row text-center">
      <h2>Homemade Goods</h2>
    </div>
    <div class="row text-center">
      <h3>This Year's Best</h3>
    </div>
    <div class="row text-center">
      <a class="btn btn-primary" href="#" role="button">See all</a>
    </div>
  </div>
</section>

#4

@designrunner64333
Have you tried
by not using the row-class

google search
== the Book ==
text-center site:getbootstrap.com
Read
http://v4-alpha.getbootstrap.com/components/utilities/#text-alignment
http://getbootstrap.com/css/#type-alignment


#5

I had the same problem! Instead of "row text-center" I changed it to "col text-center"


#6

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.