如何阻止我的文本css在我的博客上凌驾于我的表单之上?
目前我使用下面的css为我的所有文本。但是,它正在更改我博客上的表单文本(我不希望它这样做)。我如何为这个博客边栏表单设置新样式。我只想把文字居中,加粗,等等如何阻止我的文本css在我的博客上凌驾于我的表单之上?,css,forms,text,sidebar,Css,Forms,Text,Sidebar,目前我使用下面的css为我的所有文本。但是,它正在更改我博客上的表单文本(我不希望它这样做)。我如何为这个博客边栏表单设置新样式。我只想把文字居中,加粗,等等 给这个表单一个类,或者如果它是唯一的表单,我想你可以把表单。从这里,我相信您可以给出一个否定伪类: :not(form){text-align:center; font-weight:bold; /*any other css you would like to enter. make sure you copy the ent
给这个表单一个类,或者如果它是唯一的表单,我想你可以把表单。从这里,我相信您可以给出一个否定伪类:
:not(form){text-align:center; font-weight:bold; /*any other css you would like to enter. make sure you copy the entire line. this is a comment so you can delete it.*/}
或者您可能会影响表单的输入:
form input{ text-align:center; font-weight:bold; }
我希望它们能起作用。你应该为博客做类似的事情。 因此可以覆盖基础样式
p {
font-family: "HelveticaNeue-Regular", "Helvetica Neue Regular", ``"Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
font-size: 16px;
font-weight: 300;
max-width: 550px;
color: #4d4d4d;
text-align: left;
line-height: 175%;
letter-spacing: 1px;
word-spacing: 0px;
margin-top: 20px;
}
p.blog {text-align: right/*and other code*/}
<p class="blog"> This paragraph will be right-aligned. </p>/*you should give all the p in your blog the blog element*/
p{
字体系列:“HelveticaNeue Regular”、“Helvetica Neue Regular”、“Helvetica Neue”、“Helvetica Neue”、“Helvetica,Arial”、“Lucida Grande”,无衬线;
字体大小:16px;
字体大小:300;
最大宽度:550px;
颜色:#4d;
文本对齐:左对齐;
线高:175%;
字母间距:1px;
字间距:0px;
边缘顶部:20px;
}
p、 blog{text align:right/*和其他代码*/}
此段落将右对齐
/*您应该将博客中的所有p都指定为blog元素*/
祝你好运。你可以发布相关代码,而不是链接到你的网站吗?是的,所以给表单一个类,并将所有类用逗号隔开放在括号之间。这将解决您的问题。css文档中的所有类。对不起,我的意思含糊不清。我会帮你做的,稍后再发布答案。请稍等。请稍等,几个小时后我会给你。杰夫,当我自己尝试这个时,表单输入{css in here}对我来说非常有效。再次尝试这样做您可以尝试向html文件添加一些样式代码。这比css文件具有更高的优先级。您是否尝试过这样做<这是一个段落
p {
font-family: "HelveticaNeue-Regular", "Helvetica Neue Regular", ``"Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
font-size: 16px;
font-weight: 300;
max-width: 550px;
color: #4d4d4d;
text-align: left;
line-height: 175%;
letter-spacing: 1px;
word-spacing: 0px;
margin-top: 20px;
}
p.blog {text-align: right/*and other code*/}
<p class="blog"> This paragraph will be right-aligned. </p>/*you should give all the p in your blog the blog element*/