Css 如何定位页脚元素中的所有链接

Css 如何定位页脚元素中的所有链接,css,Css,我有一个网站,我正试图从HTML4升级到HTML5 前面的代码是: <div id="footer">some text and stuff ... <a href="http://">something1</a> | <a href="http://">something 2</a> | <a href="http://">something 3</a> </div>

我有一个网站,我正试图从HTML4升级到HTML5

前面的代码是:

<div id="footer">some text and stuff ...
    <a href="http://">something1</a> | 
    <a href="http://">something 2</a> | 
    <a href="http://">something 3</a>
</div>
现在我想我只是将
标记改为并修复CSS,但我没有让它工作

以下是我认为它会起作用的方式

<footer>some text and stuff ...
    <a href="http://">something1</a> | 
    <a href="http://">something 2</a> | 
    <a href="http://">something 3</a>
</footer>

footer a {
    color: #CCC;
    text-decoration: underline;
}
一些文本和内容。。。
| 
| 
页脚a{
颜色:#CCC;
文字装饰:下划线;
}
我做错了什么

****编辑:好的,这解决了这个问题:(我想这个样式是通过其他一些规则覆盖的:/)

一些文本和内容。。。
| 
| 
页脚a{
颜色:#CCC重要!;
}

您是否在IE8或更低版本上运行此功能?这很有效。JSFIDLE:我在Dreamweaver5.5中工作。从CS5开始,Dreamweaver就应该支持HTML5,所以我没想到它不能正常工作。也许这是DW中的一个错误。。。我将检查一些浏览器。默认样式标记
=>
a:-webkit任意链接{color:-webkit链接;文本装饰:下划线;光标:自动;}
如果不需要,请不要使用
重要的
。事情会也会变得越来越糟糕。使用特殊性或级联来覆盖以前的样式,而不是重要的声明。@hungerstar这就是为什么我们需要请求W3C创建
!在下一个CSS版本中非常重要
<footer>some text and stuff ...
    <a href="http://">something1</a> | 
    <a href="http://">something 2</a> | 
    <a href="http://">something 3</a>
</footer>

footer a {
    color: #CCC;
    text-decoration: underline;
}
<footer>some text and stuff ...
    <a href="http://">something1</a> | 
    <a href="http://">something 2</a> | 
    <a href="http://">something 3</a>
</footer>

footer a {
    color: #CCC important!;
}