我的样式表无法在Firefox中正确加载

时间:2013-09-06 20:01:04

标签: html css firefox

帮助!我的网站www.craminc.org在IE中正确显示,但在Firefox中没有显示。它没有在Firefox中使用样式表。有人可以帮忙吗?

它工作正常,我做了一些小改动,现在,它不起作用。

我在#left h1中发现了一些奇怪的东西,并删除了它们,并删除了Dropbox阴影,但这没有帮助。

我刚才写了这个HTML,我发现我应该在div ID周围使用引号,但这并不能解决问题。

谢谢!

这是链接

<link href="styles.css" rel="stylesheet" type="text/css" />

我也在

中有这个
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> 

这是表格

/*********** Cram Stylesheet -  By LKT ********/

body {
margin: 0px;
padding: 0px;
background: white url(images/oldpaper.gif);
text-align: justify;
text-indent: 0px;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 16px;
color: #000;
}

h1, h2, h3, h4, h5, h6 {
font-family: Georgia, "Times New Roman", Times, serif;
color: black;
text-indent: 18px;
}


/************* HEADER STUFF ************/

#header {
width: 1050px;
height: 120px;
margin: 0px auto;
padding: 10px 0px;
border-bottom: 1px solid black;
background:  url(images/header.jpg);
}

#header h1 {
    margin: 0px;
    padding: 0px 0px 70px 0px;
    text-align: left;
    color: yellow;
    font-size: 85px;
}

/************* menu ************/

#menu {
        width: 1042px;
    height:17px;
    margin: 0px auto;
    padding: 4px;
    background: #330066;
}

#menu ul {
    margin: 0px;
    padding: 0px;
    list-style: none;
    text-align: center;
}

#menu li {
    display: inline;
}

#menu a {
    padding: 2px 14px;
    text-transform: uppercase;
    text-decoration: none;
    font-size: 13px;
    font-weight: bold;
    color: #FFF;
}

#menu a:hover {
    color: white;
}


/************* CONTENT ************/

#content {
    width: 1050px;
    margin: 0px auto;
    padding: 0px;
    background: #9EBDFF ;
}

#left {
    float: left;
    width: 180px;
    padding: 0px 20px 0px 20px;
    color: #000000;
    background: #9EBDFF;
}

#left h1
    {
    margin:0in;
    margin-bottom:0.0001pt;
    font-size:14pt;
    font-family:Cambria;
    font-weight:bold;
    font-style:normal;
    line-height: normal;
    border-bottom-width: medium;
    border-bottom-style: solid;
    color: #000000;
}

#left h6
    {
    font-size: 13px;
    color: black;

}

#left a {
    padding: 5px 15px;
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
    text-align: left;
    color: #000066;
}
#left a:hover {
    color:white;
    }

#right {
    float: right;
    width: 790px;
    padding: 0px 20px 0px 20px;
    background-color: #FFF;
}

#right h1 {
    text-decoration: none;
    font-size: 24px;
    text-align: center;
    color: #0033CC;
}

#right h3 {
    text-decoration: none;
    font-size: 18px;
    text-align: center;
    color: black;
}

#right h4 {
    text-decoration: none;
    font-size: 18px;
    text-align: left;
    color: black;
}

#right p {
    text-decoration: none;
    font-size: 14px;
    text-align: justify;
    color: #000000;
}



#right a:hover {
    color:navy;
}

#clearit   {
    clear: both;
}

/************* FOOTER ************/

#footer {
    clear: both;
    width: 1048px;
    margin: 0px auto;
    border-top: 1px solid black;
    background: #7E9DFF;
    font-size: 9px;
    text-align: center;
    padding: 2px;
    color: #000066;
}

#footer  a {
    padding: 0px 0px;
    text-decoration: none;
    font-size: 10px;
    font-weight: bold;
    text-align: left;
    color: #000066;
}

#footer  a:hover {
    color:white;
    }

2 个答案:

答案 0 :(得分:3)

如果您要使用XHTML doctype,必须确保您的代码有效。如果不这样做会导致出现故障或更糟糕。

您的页面有很多XHTML错误,主要是因为您使用的是大写元素名称; XHTML规范要求您使用小写字母作为元素名称。

您可以浏览代码并将所有元素从<DIV>转换为<div>等,但说实话,没有必要 - 您没有遵守XHTML规范,很明显XHTML对你来说并不重要,所以我的建议就是改变你的doctype。

切换到HTML5文档类型,您的页面将有效。这对解决问题大有帮助:

<!DOCTYPE html>

希望有所帮助。

答案 1 :(得分:0)

当我试图在Firefox中打开样式表时,它看起来像是一堆混乱的日文字符。 CSS rendered in Japanese?

相关问题