页面背景和正文背景没有像我想象的那样显示
我正在这个网站上工作: http://www.problemio.com 我正在尝试获取整个背景和身体背景设置。
我试图将左侧和右侧的区域设为蓝色,将主体的背景设为灰色。
相反,由于某种原因,发生的事情是,除了标题全是灰色之外,一切都是蓝色的,哈哈。
我的 css 文件在这里 http://www.problemio.com/main.css
我怎样才能让颜色按照我的预期工作吗?另外,我不介意保留顶部区域的灰色背景,因为我认为现在它看起来相对不错。
I am working on this site: http://www.problemio.com and I am trying to get the entire background and the body background set.
I am trying to get the areas on the very left and right sides to be the blue color, and the background of the body to be the gray color.
Instead, what is happening is for some reason, everything is blue except the header is all gray lol.
My css file is here http://www.problemio.com/main.css
How can I get the colors working as I intended? Also, I don't mind keeping the top area with the gray background as I think now it looks relatively ok.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
@genadinik;
第一个问题是您的
container
div 没有占据子 div 的整个height
那么如何才能清除。第二:现在它占据了屏幕的整个
宽度
,所以你必须定义它的宽度@genadinik;
first problem is that your
container
div didn't take entireheight
of the child divs so how have to it clear. Second: right now it's takes entire
width
of the screen so you have to define width to it页面上的默认颜色是蓝色:
看起来您有一个 ID 为
bd
的 div,其中包含您的主要内容。由于您尚未指定此 div 的背景颜色,因此它实际上是透明的,您将看到其后面的任何背景。如果您希望颜色不同,则需要覆盖此 div 的背景颜色。The default color on your page is blue:
It looks like you have a div with the id
bd
that contains your main content. Since you haven't specified the background color for this div, it's effectively transparent and you'll see whatever background that's behind it. You'll need to override the background color on this div if you want the color to be different.