Styling the Button-Broadway, Step 4


#1

Hi,

I don't think I understand what I am being asked to do. I added the link to the phrase "Get Started", and gave it a class of #btn.main. Once I assign this class to the link, shouldn't the styles already inputted on the .css automatically create the button, or do I have to add something more? If so, the lesson, does not tell you how many pixels wide and long the button should be, it only specifies dark gray. I tried inputting width and height to see if that is what it wanted, but still not button appears.

html, body {
  margin: 0;
  padding: 0;
}

.header{background-color:#333333;
  
}
.container {
  max-width: 940px;
  margin: 0 auto;
  padding: 0 10px;
}

.jumbotron {
  height: 800px;
  background-image:url(http://s3.amazonaws.com/codecademy-content/projects/broadway/bg.jpg);
  background-size:cover;
}

.nav {
  margin: 0;
  padding: 20px 0;
}

.nav li {
  color: #fff;
  font-family: 'Raleway', sans-serif;
  font-weight: 600;
  font-size: 12px;
  display:inline-block;
}

.main {
  position: relative;
  top: 180px;
  text-align: center;
}

.main h1 {
  color: #333;
  font-family: 'Raleway', sans-serif;
  font-weight: 600;
  font-size: 70px;
  margin-top: 0;
  margin-bottom: 80px;
  text-transform: uppercase;
}

.btn-main {
  background-color: #333;
  color: #fff;
  font-family: 'Raleway', sans-serif;
  font-weight: 600;
  font-size: 18px;
  letter-spacing; 1.3px;
  padding: 16px 40px;
  text-decoration: none;
  text-transform: uppercase;
  height:50px;
   width:120px;
  border-style:solid;
  border-width:2px;
  background-color:#bcd2ee;

  
}

.supporting {
  padding-top: 80px;
  padding-bottom: 100px;
}

.supporting .col {
  float: left;
  width: 33%;
  font-family: 'Raleway', sans-serif;
  text-align: center;
}

.supporting img {
  height: 32px;
}

.supporting h2 {
  font-weight: 600;
  font-size: 23px;
  text-transform: uppercase;
}

.supporting p {
  font-weight: 400;
  font-size: 14px;
  line-height: 20px;
  padding: 0 50px;
  margin-bottom: 40px;
}

.clearfix {
  clear: both;
}

.footer {
  background-color: #333;
  color: #fff;
  padding: 30px 0;
}

.footer p {
  font-family: 'Raleway', sans-serif;
  text-transform: uppercase;
  font-size: 11px;
}

@media (max-width: 500px) {
  .main h1 {
    font-size: 50px;
    padding: 0 40px;
  }

  .supporting .col {
    width: 100%;
  }
}

And here i the formatting for btn.main that was already inputted by codeacademy

.btn-main {
  background-color: #333;
  color: #fff;
  font-family: 'Raleway', sans-serif;
  font-weight: 600;
  font-size: 18px;
  letter-spacing; 1.3px;
  padding: 16px 40px;
  text-decoration: none;
  text-transform: uppercase;
  height:50px;
   width:120px;
  border-style:solid;
  border-width:2px;
  background-color:#bcd2ee;

  
}

#2

can you share the HTML as well as the CSS that youve included


#3

Oops! Sorry, I guess the copy and past didn't take, here it is:

<!DOCTYPE html>
<html>
  <head>
    <link href='https://fonts.googleapis.com/css?family=Raleway:400, 600' rel='stylesheet' type='text/css'>
  <link rel='stylesheet' href='style.css'/>
  </head>
  <body>
    <div class="header">
      <div class="container">
        <ul class="nav">
          <li>About</li>
          <li>Work</li>
          <li>Team</li>
        <li>Contact</li>

        </ul>
      </div>
    </div>

    <div class="jumbotron">
      <div class="container">  
        <div class="main">
          <h1>We are Broadway</h1>
          <a href="https://www.yahoo.com/ class="#btn-main">Get Started</a>
        </div>
      </div>
    </div>

    <div class="supporting">
      <div class="container">
        <div class="col">
          <img src="https://s3.amazonaws.com/codecademy-content/projects/broadway/design.svg">
          <h2>Design</h2>
          <p>Make your projects look great and interact beautifully.</p>

   </div>
        <div class="col">
          <img src="https://s3.amazonaws.com/codecademy-content/projects/broadway/develop.svg">
          <h2>Develop</h2>
          <p>Use modern tools to turn your design into a web site</p>
          
        </div>
        <div class="col">
          <img src="https://s3.amazonaws.com/codecademy-content/projects/broadway/deploy.svg">
          <h2>Deploy</h2>
          <p>Use modern tools to turn your design into a web site</p>
          
        </div>
      </div>
      <div class="clearfix"></div>
    </div>

    <div class="footer">
      <div class="container">
        <p>&copy; Broadway 2015</p>
      </div>
    </div>
  </body>
</html>

#4

ok on your a-link for 'get started' you have declared it to have the class "#btn-main"

but in your css you have it listed as btn-main.

so you should either change the class name in the html file to : "btn-main"

-or-

change your css file to .#btn-main.

You should proabably change the class name on the HTML page instead of CSS because when the hashtag, #, is put in front of a name it is associated with an ID rather than a class name, so change the "get started' class name to btn-main, not #btn-main


#5

Oh my God! I can't believe I made that mistake, lol. You are right, # is for id, I'm just drowning in all these codes trying to remember them all that I am even messing up the ones that I already know, ha!

Thanks so much! I have taken off the # and saved, but still no button.


#6

it should make the text clickable but shouldnt create a button

if u want to make a button u need to declare a <*button> (without the asterisk)

and I know trying to remember all the rules can be overwhelming!


#7

Yes it made it clickable. I went back to the CodeAcademy lesson,Creating a button, and added in the length, width and other properties but that still did not work,

So you are saying declare a button? I am assuming you mean on the css file?I have no idea how to do that because the CodeAcademy lesson doesn't show anything about adding a declaration named button, it just states height, width, border-radius, border color and background color to make a button.


#8

ok your missing an end quote after yahoo.com... try that, if it doesnt fix it try this

<button> <a href="https://www.yahoo.com/ class="btn-main">Get Started<*/button>

(remove asterisks)


#9

Thanks! That worked! It is odd that Code Academy does not mention anything about the button tag in the "Creating a Button" lesson, which is what I was going by when trying to make the button. Now it is a white button so I went to an RGB color picker site to get slate gray to change it but it is not responding. I can't believe I have been on this same lesson since this morning! LOL!

<!DOCTYPE html>
<html>
  <head>
    <link href='https://fonts.googleapis.com/css?family=Raleway:400, 600' rel='stylesheet' type='text/css'>
  <link rel='stylesheet' href='style.css'/>
  </head>
  <body>
    <div class="header">
      <div class="container">
        <ul class="nav">
          <li>About</li>
          <li>Work</li>
          <li>Team</li>
        <li>Contact</li>

        </ul>
      </div>
    </div>

    <div class="jumbotron">
      <div class="container">  
        <div class="main">
          <h1>We are Broadway</h1>
          <button><a href="https://www.yahoo.com/ class="btn-main"> Get Started</a></button>
        </div>
      </div>
    </div>

    <div class="supporting">
      <div class="container">
        <div class="col">
          <img src="https://s3.amazonaws.com/codecademy-content/projects/broadway/design.svg">
          <h2>Design</h2>
          <p>Make your projects look great and interact beautifully.</p>
          
        </div>
        <div class="col">
          <img src="https://s3.amazonaws.com/codecademy-content/projects/broadway/develop.svg">
          <h2>Develop</h2>
          <p>Use modern tools to turn your design into a web site</p>
          
        </div>
        <div class="col">
          <img src="https://s3.amazonaws.com/codecademy-content/projects/broadway/deploy.svg">
          <h2>Deploy</h2>
          <p>Use modern tools to turn your design into a web site</p>
          
        </div>
      </div>
      <div class="clearfix"></div>
    </div>

    <div class="footer">
      <div class="container">
        <p>&copy; Broadway 2015</p>
      </div>
    </div>
  </body>
</html>

CSS:

html, body {
  margin: 0;
  padding: 0;
}

.header{background-color:#333333;
  
}
.container {
  max-width: 940px;
  margin: 0 auto;
  padding: 0 10px;
}

.jumbotron {
  height: 800px;
  background-image:url(http://s3.amazonaws.com/codecademy-content/projects/broadway/bg.jpg);
  background-size:cover;
}

.nav {
  margin: 0;
  padding: 20px 0;
}

.nav li {
  color: #fff;
  font-family: 'Raleway', sans-serif;
  font-weight: 600;
  font-size: 12px;
  display:inline-block;
}

.main {
  position: relative;
  top: 180px;
  text-align: center;
}

.main h1 {
  color: #333;
  font-family: 'Raleway', sans-serif;
  font-weight: 600;
  font-size: 70px;
  margin-top: 0;
  margin-bottom: 80px;
  text-transform: uppercase;
}

.btn-main {
  background-color: #708090;
  color: #fff;
  font-family: 'Raleway', sans-serif;
  font-weight: 600;
  font-size: 18px;
  letter-spacing; 1.3px;
  padding: 16px 40px;
  text-decoration: none;
  text-transform: uppercase;
  
  

  
}

.supporting {
  padding-top: 80px;
  padding-bottom: 100px;
}

.supporting .col {
  float: left;
  width: 33%;
  font-family: 'Raleway', sans-serif;
  text-align: center;
}

.supporting img {
  height: 32px;
}

.supporting h2 {
  font-weight: 600;
  font-size: 23px;
  text-transform: uppercase;
}

.supporting p {
  font-weight: 400;
  font-size: 14px;
  line-height: 20px;
  padding: 0 50px;
  margin-bottom: 40px;
}

.clearfix {
  clear: both;

#10

yeah things get confusing! checkout this website for help in css/html .... http://www.w3schools.com/css/css3_intro.asp


#11

708090 - this is the slate gray color that I used to change the button to a gray as the lesson instructed, but it does not work.

Thanks for that link!