Ada Davidsson
Ada Davidsson

Reputation: 67

Html #footer doesnt show up

So I would just like to say that I have been studying web-development mostly self thought but I did go to school for a year for it as well, Now, on to my problem, so I am designing a simple website design and I am trying to get the footer to show up, but I cant seem to make it work I've been messing around with it and it just doesn't seem to want to work. Here is the code

          #footer
      {
        background-color: black;
        height: 40px;
        width: 100%;
        color: white;
        padding: 20px;
      }

      p
      {
      margin-bottom: 20px;
      }

   </style>
   <body>

       </div>
      </div>
     <div = id "footer">
     <div class = "container">Copyright Notice</div>
     </div>

Yes I did cut out a part that wasn't necessary and it made the question look really weird, Sorry for my grammar, English isn't my first language.

Upvotes: 0

Views: 55

Answers (2)

rev087
rev087

Reputation: 163

I'm assuming the HTML code you pasted is incomplete, as it begins with the closing of two div tags.

Discarding the two first lines, here's how your code should look like:

<div id="footer">
    <div class="container">Copyright Notice</div>
</div>

Notice that on the first div you had the = before id. HTML tags are composed of a tag name and optional space-separated properties and their respective values as in this example:

<tagname property1="value1" property2="value2>Content</tagname>

Having spaces around the = won't break your code in most situations, but it's not a good practice.

Upvotes: 0

pavel
pavel

Reputation: 27092

You have a syntax error in HTML. There has to be:

<div id="footer">

instead of

<div = id "footer">

Upvotes: 1

Related Questions