为什么我不能设置这个标签标签的样式?

时间:2012-09-13 23:15:12

标签: html css

无论我做什么,我的CSS都不会设置标签标签。

CSS:

label {
        font-family: 'Lucida Grande';
    }

HTML:

<div class="contact-form">
            <form action="post">
                <label for="name">Name:<input type="text" id="name" class="text" /></label>
                <label for="email">Email:<input type="text" id="email" class="text" /></label>
                <label for="message">Message:<textarea id="message"></textarea></label>
                <input type="submit" class="submit" value="Send Message" />
            </form>
        </div>
猜猜是什么?不是LUCIDA GRANDE。

在此处采取行动:http://christianselig.com/contact.html

1 个答案:

答案 0 :(得分:4)

也许是因为reset.css覆盖了style.css

<!-- Stylesheets -->
<link href="css/style.css" rel="stylesheet" type="text/css" media="all" />
<link href="css/reset.css" rel="stylesheet" type="text/css" media="all" />

label选项卡包含在reset.css

中此块的第8行
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed, 
figure, figcaption, footer, header, hgroup, 
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
    margin: 0;
    padding: 0; 
    border: 0;
    font-size: 100%;
    font: inherit; 
    vertical-align: baseline;
}