和主要和内容显示为蓝色,它们需要为红色?[英] and Main and Content are showing up blue and they need to be red? 本文翻译自  user1319431  查看原文  2012-04-07  1508    html/

时间:2022-06-22 19:41:32

How do I make Main and content red? What am I doing wrong? When I type this is in

如何将Main和内容设为红色?我究竟做错了什么?当我输入时,这是

<div id="main">
<div id="content"> 

main and content come out in blue and they should come out in red. Thanks!

主要和内容以蓝色显示,它们应该以红色显示。谢谢!

1 个解决方案

#1


0  

I can't see the code, except for the snippet you posted in a comment.

除了您在评论中发布的片段外,我看不到代码。

Question: Do you want the background or the textcolor to change?

问题:您想要更改背景或文本颜色吗?

Also you are using the selectors wrong. Just use an extra space between #main,#content.

你也使用错误的选择器。只需在#main,#content之间使用额外的空间。

Put this in your CSS file:

把它放在你的CSS文件中:

#main, #content{color:red;}

I hope this helps!

我希望这有帮助!

#1


0  

I can't see the code, except for the snippet you posted in a comment.

除了您在评论中发布的片段外,我看不到代码。

Question: Do you want the background or the textcolor to change?

问题:您想要更改背景或文本颜色吗?

Also you are using the selectors wrong. Just use an extra space between #main,#content.

你也使用错误的选择器。只需在#main,#content之间使用额外的空间。

Put this in your CSS file:

把它放在你的CSS文件中:

#main, #content{color:red;}

I hope this helps!

我希望这有帮助!