Bolt Network Button position issues


#1


https://www.codecademy.com/courses/web-ext/projects/html-css-prj_bolt-network?user_id=5684227a86f5529ac7000727


I am trying to position my Learn More button so that it is positioned in the centre, as it appears in the actual page. No matter what I try I cannot get it to move from the left into the centre.

Please can someone help me out with this. Thank you.


<!doctype html>
<html>
  <head>
    <link rel="stylesheet" href="https://s3.amazonaws.com/codecademy-content/projects/bootstrap.min.css">
    <link href='https://fonts.googleapis.com/css?family=Oxygen:300,400,700' rel='stylesheet' type='text/css'>
    <link rel="stylesheet" type="text/css" href="style.css">
  </head>
  <body>

    <div class="jumbotron">
      <div class="container">
        <div class="header">
          
          <div class="row">
            
            <div class="col-md-2">
              <img src="https://s3.amazonaws.com/codecademy-content/projects/bolt-network/logo.svg"/>
              
            </div>
            
            <div class="pull-right">
              <ul>
                <li>Login</li>
                <li><a href="#" class="btn btn-default" active role="button">Sign Up</a></li>
              </ul>
              
            </div>
            
          </div>

        </div>

        <div class="main">
          <h1>Watch your favourite movies,instantly.</h1>
          
          <a href="#" class="btn btn-default">Learn More</a>
          
          <form class="form-inline" role="form">
           <div class="form-group">
             
             <input type="text" class="form-control" id="search" placeholder="Browse the collection">
             
            </div>
          </form>
          
        </div>
      </div>
    </div>

    <div class="supporting">
      <div class="container">

      </div>
    </div>

    <div class="feature">
      <div class="container">
        
      </div>
    </div>

    <div class="footer">
      <div class="container">
        
      </div>
    </div>

  </body>
</html>


html, body {
  font-family: "Oxygen", sans-serif; 
  font-weight: 300; 
  margin: 0;
  padding: 0;
}
/*Jumbotron*/
.jumbotron {
  background: #000000;
  height: 500px;
}
.jumbotron h1 {
  text-align: center;
  color: #fff;
  margin-bottom: 40px;
  margin-top: 40px;
}

.jumbotron .btn {
  background: transparent;
  border: solid 1px #0393FF;
  color: #0393FF;
  border-radius: 2px;
  padding: 8px 20px;
}

.jumbotron a:hover {
  background-color: #0393FF;
  color: #fff;
 }

.pull-right li {
  display: inline;
  padding: 15px;
}

/*Header*/
.header {
  color: #fff;
}

.btn {
  display: inline-block;
  text-align: center;
}

.container {
  max-width: 970px;
}

.supporting {
  background-image: url(s3.amazonaws.com/codecademy-content/projects/bolt-network/diagmonds_@2X.png);
  background-size: 141px 142px;
}


#2

bootstrap has a text-center class:

<div class="main text-center">

of course you could also write the css code yourself


#3

I'll try this out. thanking you.

I did try using text-align: center; and didn't get any joy!


#4

text-align center should work, can i see how you implemented this?


#5

Hi,

I've amended the code since then, sorry.

text-align: center worked when I added it to .main

I think I'd added it on the wrong container earlier!

Thank you


#6

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