treehouse : what would you like to learn today?
Web Design Web Development iOS Development

Styling the footer element.

  • hey guys i am wondering if anyone else is facing the same problem as me. I have wrapped my copyright and footer navigation in
    <footer>...</footer>
    tags and when i am trying to apply style to this particular tag,
    i.e footer{padding:10px;} nothing happens. I am using the latest version of Firefox and chrome, the weird thing is footer doesn't even get highlighted when i am using the dev tools(both chrome and the latest Firefox dev tools), they are behaving as if my footer is not a sectioning element. And what should i do when my text decoration: underline works for a particular anchor link in Firefox and doesn't work in chrome? (only one anchor tag poses this problem the rest all are good).
    My index.html
    My style.css
  • I tried your page and styles locally and it worked fine - I was able to apply padding to the footer and the links worked in FF and Chrome. Have you validated?
  • Some the older IE's don't support HTML5 elements, I haven't looked at your page in a browser I'm afraid but if you're experiencing problems it may be worth adding the following javascript at the start of they page:


    <script type="text/javascript">
    document.createElement("article");
    document.createElement("footer");
    document.createElement("header");
    document.createElement("hgroup");
    document.createElement("nav");
    </script>


    and in your css


    header, nav, article, footer, address {
    display: block;
    }


    Thanks!