CSS style is ignored by <footer>

So far I have used <div>for the header and footer, but as I move on to HTML5, I want to replace them with <header>and tags <footer>. The old version had a style definition

#footer a {
  text-decoration: none;
}

remove underline from links. This works as expected. But after switching to the tag <footer>:

footer a {
  text-decoration: none;
}

style is ignored. What am I doing wrong?

(full code, including styles, can be found here )

+4
source share
2 answers

Specificity.

#footer ais the identifier ( #footer) and element ( a).

, , .

footer a , , a:link, (psuedo), , , .

, , - footer a - , footer a:link, footer a:visited.

, , . , 255 = 1 255 = 1 ID ( ). !important , -, . - , ( , !important) 0,0,0 (, , ).

#footer a 1,0,1.

a:link 0,1,1.

footer a 0,0,2.

. footer a , a:link, 1 1 , . - footer#footer a, footer.bottom a, footer a:link, footer a:visited .. ( HTML). HTML-, psedoclasses :link :visited ( , , psuedo-elements, :before :after count ).

a:link, a:visited a, , , , .

- , , , CSS. , :

+4

- ...

a:link, a:visited footer a,

footer a:link, 
footer a:visited {
   text-decoration: none;
}
+3

All Articles