user6660680
user6660680

Reputation:

Footer bar can't align text

Hey my footer bar at the bottom of my page wont align text.

This is my html:

  <div class="row">
    <div id="footer">
    <h3>Contact</h3>
    <h3>Computerbasen</h3>
    <h3>Info</h3>
    </div>
  </div>

And this is my css:

#footer {
    background-color: #FF7633;
    width: 100%;
    height: 50px;
    border-radius: 5px;
    padding-top: 10px;
    text-align:center;
    position: fixed;
    bottom: 0;
  }

Click here and see the image of the footer bar

Upvotes: 0

Views: 48

Answers (3)

Johannes
Johannes

Reputation: 67814

If you mean horizontal alignment, use this rule:

#footer h3 {
 text-align:center;
}

(the h3 elements have 100% width and left-alignment by default)

Upvotes: 1

Aldin Juko
Aldin Juko

Reputation: 106

You know there is a footer tag in html, try this:

<footer>
<h3>Contact</h3>
<h3>Computerbasen</h3>
<h3>Info</h3>
</footer>

footer {
  background-color: #FF7633;
    width: 100%;
    height: 50%;
    border-radius: 5px;
    padding-top: 10px;
    text-align:center;
    bottom: 0;
}

Upvotes: 1

rotgers
rotgers

Reputation: 2030

Try

#footer {
    height: 150px;
}

Most of the text is not showing up because the height is too small.

Upvotes: 0

Related Questions