0

No matter what I put after these buttons, the content under them is also a button. What am I missing? You can see on my current site - the footer is after the button so there's a half footer that links to google (same place as the buttons).

http://staging.yodega.com/sell

Would include a screenshot but that won't really convey it.

Relevant code attached.

/* formats buttons on sell page */
#buttons {
      text-align: center;
      margin-top: 30px;
    }
#button1{
    width: 200px;
    height: 50px;
    border-radius: 25px; 
    -moz-border-radius: 25px; 
    -webkit-border-radius: 25px; 
    border: 0px solid #800000;
    color:#F0E8E0;
    background-color:#3a3a3a;
    margin-bottom: 5px;
    margin-right: 3px;
    margin-left: 3px;
}
#button2{
    width: 200px;
    height: 50px;
    border-radius: 25px; 
    -moz-border-radius: 25px; 
    -webkit-border-radius: 25px; 
    border: 0px solid #800000;
    color:#F0E8E0;
    background-color:#3a3a3a;
    margin-bottom: 5px;
    margin-right: 3px;
    margin-left: 3px;
}
<div class="clear"></div>

    <div class="astericks">

*Base rate starts at 5.5% and can be lowered via referrals. Learn more on the <a href="yodega.com/referrals">referrals</a> page
    
    </div>

<div id="buttons">
  <a href="http://www.google.com"><button type="button contact-button" id="button1">Sign Up</button>
  <a href="http://www.google.com"><button type="button contact-button" id="button2">Seller Resources</button
</div>
<div class="clear"></div>
Jacob Jordan
  • 89
  • 1
  • 7

2 Answers2

3

You have an improperly closed <button> tag. I've updated </button to </button> in the below snippet. You also never close your <a> tags, that has also been updated.

As a heads up it is not valid HTML to have a button tag nested inside of an anchor tag. See https://stackoverflow.com/a/6393863/1168379 if you want it to look like a button, but function like a link then update the snippet so that <button> is removed and <a> has all the styling you want done to make it look like a button.

/* formats buttons on sell page */
#buttons {
      text-align: center;
      margin-top: 30px;
    }
#button1{
    width: 200px;
    height: 50px;
    border-radius: 25px; 
    -moz-border-radius: 25px; 
    -webkit-border-radius: 25px; 
    border: 0px solid #800000;
    color:#F0E8E0;
    background-color:#3a3a3a;
    margin-bottom: 5px;
    margin-right: 3px;
    margin-left: 3px;
}
#button2{
    width: 200px;
    height: 50px;
    border-radius: 25px; 
    -moz-border-radius: 25px; 
    -webkit-border-radius: 25px; 
    border: 0px solid #800000;
    color:#F0E8E0;
    background-color:#3a3a3a;
    margin-bottom: 5px;
    margin-right: 3px;
    margin-left: 3px;
}
<div class="clear"></div>

    <div class="astericks">

*Base rate starts at 5.5% and can be lowered via referrals. Learn more on the <a href="yodega.com/referrals">referrals</a> page
    
    </div>

<div id="buttons">
  <a href="http://www.google.com"><button type="button contact-button" id="button1">Sign Up</button></a>
  <a href="http://www.google.com"><button type="button contact-button" id="button2">Seller Resources</button></a>
</div>
<div class="clear"></div>
Charles
  • 1,121
  • 19
  • 30
2

Try this :) You were opening <a> tags but closing with <button>.

<div id="buttons">
  <a href="http://www.google.com" id="button1">Sign Up</a>
  <a href="http://www.google.com" id="button2">Seller Resources</a>
</div>
<div class="clear"></div>

I say leave it as an <a> as they are easier to use within html. try:

    #buttons {
      color: blue;
      padding: 20px;
      box-shadow: 
       0 1px 2px #fff, /*bottom external highlight*/
       0 -1px 1px #666, /*top external shadow*/ 
       inset 0 -1px 1px rgba(0,0,0,0.5), /*bottom internal shadow*/ 
       inset 0 1px 1px rgba(255,255,255,0.8); /*top internal highlight*/
       }

for an appearance like a button

Also..

<div class="astericks">

*Base rate starts at 5.5% and can be lowered via referrals. Learn more on the <a href="yodega.com/referrals">referrals</a> page

    </div>

It's good practice to declare what you've written in the div with an element. Is it a <p>, <h1>, <h2>, ect.

Hope this helps!

snw123
  • 21
  • 4