Ruby on rails CSS和模板
我有一个关于css和我正在使用的模板的快速问题 我的CSS中有两个字段:Ruby on rails CSS和模板,ruby-on-rails,css,Ruby On Rails,Css,我有一个关于css和我正在使用的模板的快速问题 我的CSS中有两个字段: .content { padding:10px; width: 100% text-align:justify; font: 9pt/14pt 'Lucida Grande', Verdana, Helvetica, sans-serif; } #errorExplanation { width: 400px; border: 2px solid red; padding: 7px; padding-b
.content
{
padding:10px;
width: 100%
text-align:justify;
font: 9pt/14pt 'Lucida Grande', Verdana, Helvetica, sans-serif;
}
#errorExplanation {
width: 400px;
border: 2px solid red;
padding: 7px;
padding-bottom: 12px;
margin-bottom: 20px;
background-color: #f0f0f0;
}
#errorExplanation h2 {
text-align: left;
font-weight: bold;
padding: 5px 5px 5px 15px;
font-size: 12px;
margin: -7px;
background-color: #c00;
color: red;
}
#errorExplanation p {
color: #333;
margin-bottom: 0;
padding: 5px;
}
#errorExplanation ul li {
font-size: 12px;
list-style: square;
}
在我的html代码中
<div class="content">
<div class="errorExplanation" id="errorExplanation">
<h2> 10 errors prohibited this counselor questionary from being
saved
</h2>
<p>There were problems with the following fields:</p>
</div>
</div>
10个错误禁止该咨询师提问
保存的
以下字段存在问题:
我希望基于css的#error解释是红色的,但事实并非如此。我是css新手,所以我想我遗漏了一些东西
例如,单击并按下下一步按钮。您会注意到由RubyonRails验证生成的错误消息弹出窗口,但它不是红色的。我希望它是红色和粗体的
任何建议,谢谢 在您提供的网站上,我看不到您的样式表中的错误解释。它肯定被上传了吗?或者我可能在某个地方错过了它。在您提供的网站上,我看不到您的样式表中的错误解释。它肯定被上传了吗?或者我可能在某个地方错过了它。您提供的链接上的CSS不包含您在上面粘贴的CSS代码。这就是它没有红边的原因。您提供的链接上的CSS不包含您在上面粘贴的CSS代码。这就是为什么它没有红边。你的问题是“我希望错误解释是红色的”。我暗示你指的是背景色。我会避免将问题作为介词来使用,因为它会产生一种相对模糊的感觉,这在短信中很难解释 您的CSS for#errorexplainion将背景声明为白色,边框声明为红色 要获得红色背景,代码如下:
#errorExplanation {
width: 400px;
border: 2px solid red;
padding: 7px;
padding-bottom: 12px;
margin-bottom: 20px;
background-color: red; /* #f0f0f0 is white */
}
你的问题是“我希望#errorexplation是红色的”。我暗示你指的是背景色。我会避免将问题作为介词来使用,因为它会产生一种相对模糊的感觉,这在短信中很难解释
您的CSS for#errorexplainion将背景声明为白色,边框声明为红色
要获得红色背景,代码如下:
#errorExplanation {
width: 400px;
border: 2px solid red;
padding: 7px;
padding-bottom: 12px;
margin-bottom: 20px;
background-color: red; /* #f0f0f0 is white */
}
如果您使用的是chrome,您可以通过单击“检查项目”来查看它,您将看到它引用了包含这些值的style.css。还是我遗漏了什么?如果您使用的是chrome,您可以通过单击“检查项目”来查看它,您将看到它引用了包含这些值的style.css。还是我遗漏了什么?治疗师调查治疗师调查强奸犯调查??你在写什么样的应用程序!?:强奸犯调查??你在写什么样的应用程序!?:P