[英]How do I add padding or margin and change font in CSS? (Wordpress)
Well this is my website, defensionem.com (It is a website dedicated to men and women and machines related to the military.)嗯,这是我的网站,defensionem.com(这是一个专门针对男性和女性以及与军事有关的机器的网站。)
I want the site to be readable to everyone, I have stumbled upon a rather tricky issue.我希望每个人都可以阅读该网站,我偶然发现了一个相当棘手的问题。
http://defensionem.com/2015/09/13/us-military-demo-2/ http://defensionem.com/2015/09/13/us-military-demo-2/
In the above page, I would like the article text (including the Share, About and Comments) and the sidebar to be pushed into the centre of the screen.在上面的页面中,我想将文章文本(包括分享、关于和评论)和侧边栏推到屏幕中央。
I tried padding and using this it worked.我尝试填充并使用它。
I am unable to change the font though.虽然我无法更改字体。
.article-body-wrap{
padding-left:200px;
}
.sidebar_right-sidebar_col-sm-3{
padding-right:200px;
}
This worked but I tried changing the font which did not.这有效,但我尝试更改没有的字体。 (It changed the font for everything).
(它改变了一切的字体)。
.body-text_clearfix{
font-size:32px;
}
Above yielded no result.以上没有结果。 How do I change the font of only the text?
如何仅更改文本的字体? Which element tag/class do I use to change it?
我使用哪个元素标签/类来更改它?
You have an error:你有一个错误:
.sidebar_right-sidebar_col-sm-3{
padding:right:200px;
//-----^
}
Change it to padding-right
:将其更改为
padding-right
:
.sidebar_right-sidebar_col-sm-3 {
padding-right:200px;
//-----^
}
You can change it to a different font by using font-family
in it:您可以通过在其中使用
font-family
将其更改为不同的字体:
.className {font-family: Arial;}
.className {font-family: Times;}
I cant help with the padding but for the font you want to give the text you want to change a class like so我无法帮助填充,但对于你想要给文本的字体,你想要改变这样的类
<body>
<h1>Example Text</h1>
<p class="Potato">Text With Font</p>
</body>
And Then for your CSS然后为你的 CSS
body > .Potato{
font-size:32px;
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.