css font property not working

I´ve been styling my site project with css on dreamweaver.

So far I managed to style the font size, color, alignement, but even thought it all looks fine in the design view of dreamweaver, in the browser it keeps displaying times new romam, wich is not what I wanted. All other properties look fine... It doesn't work when on my style sheet is:

font-family: verdana; < but it works when I add it on the:

<div style:"font-family:'verdana'">

Any help? Thanks...

UPDATE

#footer {
    width:900px;
    height:50px;
    background-color:#F60;
    line-height:50px;
}

.footer {
    font:Verdana, Geneva, sans-serif;
    font-size:16px;
    text-decoration:none;
    color:#000;
    margin-left:15px;
}

<div id="footer">
<a class="footer"> Blah Blah Blah</a>
</div><!--footer-->

This is still displaying times new roman...


'Syntax error?

1.It should be like <div style="font-family:'verdana'">

2.Try this

.footer { font-family:'Verdana', Geneva, sans-serif; font-size:16px; text-decoration:none; color:#000; margin-left:15px; }

3.If stil doesn't work. Try

.footer { font-family:'Verdana', Geneva, sans-serif !important; font-size:16px; text-decoration:none; color:#000; margin-left:15px; }

4.Also check with Firebug what styles been applied to element


There might be another font tag that overrides your original font-family tag.

Where are you putting that font-family: tag? If you want it to be active across your entire document, either attach it to the Body, or some container that encompasses your entire page.

Paste your code if you still can't figure it out.


写在你的CSS这样的font font-family而不是font

.footer {
    font-family:Verdana, Geneva, sans-serif;
    font-size:16px;
    text-decoration:none;
    color:#000;
    margin-left:15px;
}
链接地址: http://www.djcxy.com/p/15350.html

上一篇: GridView线路不在IE中显示

下一篇: CSS字体属性不起作用