div背景,除了标题,不会出现?

时间:2015-04-09 18:11:45

标签: html

我已经搜索了大约一个星期,但我还没有找到真正帮助我的答案。 我是非常基本的HTML和我真正拥有的最多经验是neopets大声笑

我正在学校为我的班级制作一个页面,我的页面中有三个当前活动的div。标题div工作正常,但我的mainContent和导航ID似乎忽略了我希望bg颜色为橙色的事实。任何帮助将不胜感激!

HTML: 
<html><head><title>GUMI MEGPOID | Home</title></head>
<body>
<div id="header"><h1>GUMI MEGPOID</h1></div>
<div id="navigation">
<p><a href="{text:Link one url}">Home</a>
<a href="{text:Link two url}">Albums</a>
<a href="{text:Link three url}">Lyrics</a>
<a href="{text:Link four url}">Tours</a>
</p></div>
<div id=”mainContent”><p>blah blah blah.<p></div>
</body></html>

CSS:

h1 {color: #eeee99; font-size: 3 em; text-align: center; }
h2 {color: #eeee99; line-height: 130%; font-size: 1.75 em; font-family: 宋体; }
h3 {color: #eeee99; line-height: 130%; font-size: 1.625 em; }
p {color: #eeee99; line-height: 130%; font-size: .9em; margin-left: 10%; margin-right: 10%; }
p1 {color: #eeee99; line-height: 130%; font-size: .75em; }
body { background-color: #eeee99; }
#header { width: 650px; height: 100px; line-height: 100px; background: rgb(238, 119, 34);  margin-bottom: 10%; text-align: center; align: right; }
#mainContent { width: 780px; height: 500px; background: rgb(238, 119, 34);  /* Fallback */ background: rgba(238, 119, 34, .6); text-align: center; }
#navigation { width: 200px; height: 100px; top: auto; margin-left: 160px; position: fixed; margin-top: 10px; -webkit-transition: all 0.6s ease-in-out; -moz-transition: all 0.6s ease-in-out; -o-transition: all 0.6s ease-in-out; }

#navigation a { font-size: 11px; line-height: 20px; display: inline-block; margin-top: 5px; width: 100px; text-align: center; color: #eeee99; background-color: {color: #ee7722}; -webkit-transition: all 0.5s ease-in-out; -moz-transition: all 0.5s ease-in-out; -o-transition: all 0.5s ease-in-out; transition: all 0.5s ease-in-out; }

#navigation a:hover { color: #eeee99; background-color: {color: #ee7722}; opacity: 0.5; -webkit-transition: all 0.5s ease-in-out; -moz-transition: all 0.5s ease-in-out; -o-transition: all 0.5s ease-in-out; transition: all 0.5s ease-in-out; }</style>

2 个答案:

答案 0 :(得分:3)

此行中的双引号

<div id=”mainContent”><p>blah blah blah.<p></div>

应该直接(“)而不是卷曲(”)引号。

答案 1 :(得分:0)

#navigation a上的background-color标签错误。尝试与身体相同:

  background-color: #ee7722;