My buttons show up as one button

html-css

#1

this is for my website not codecademy but i need help so have a bunch of buttons in my code but they all show up as one button please help this is my code:

<!DOCTYPE html>
  <html>
    <head>
        <title>GrogNozzle.com</title>
        <link href="https://fonts.googleapis.com/css?family=Lobster" rel="stylesheet">
        <link href="https://fonts.googleapis.com/css?family=Lato" rel="stylesheet">
        <link rel="stylesheet" type="text/css" href="main.css"/>
    </head>
   <body background: “https://source.unsplash.com/78A265wPiO4/1600x900”>


<div class="button">
<a style="text-decoration: none;"rel="click here" href="index.html"> Home</a>
<a style="text-decoration: none;"rel="click here" href="Blog.html">Blog</a>
<a style="text-decoration:none;"rel="click here"  href="contatct.html">contact me</a>
</div>

#2

Hi @princesslana,

I believe you omit your CSS code in your post?

You have only one button because you have only make one div with the class of button.

If you want more, you can try the option of creating more divs enclosing each <a> to create more button classes. Like:

<div class="button"><a href="  ">First</a></div>
<div class="button"><a href="  ">Second</a></div>

I believe your intention is to create a navigation rather than a button, but for further reading using HTML5 element, you can read about what is:

and

Cheers :slight_smile:


#3

thank you so much that is actually really helpful i knew i was doing something wrong


#4

and it worked thank you!


#5

You’re welcome @princesslana. Glad that it works.

Happy Coding! :smiley:


A small note:
There’s a spelling mistake in your naming path,
href="contatct.html", I think it should be contact.html


#6

yeah i fixed it :smile:


#7

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