简体   繁体   English

css元素在填充边框后消失

[英]css element dissapears behind padding border

I need your help. 我需要你的帮助。

The Title in the green Box "News" appears right under this Link. 绿色框“新闻”中的标题出现在此链接的正下方。 http://www.mjart.ch/category/news/ http://www.mjart.ch/category/news/

But because of this weird Template I'm using, there are sometimes some imperfections. 但是由于我使用的是这个怪异的模板,所以有时会有一些缺陷。 On this Site here http://www.mjart.ch/portfolio/ the Green title seems to disappear behind the padding border. 在此站点上,这里http://www.mjart.ch/portfolio/绿色标题似乎消失在填充边框的后面。 I really don't know why. 我真的不知道为什么

What I found out is that there are 2 different CSS styles. 我发现有2种不同的CSS样式。 The first one that works is a .blog-title and the second one is a .single-title . 第一个有效的是.blog-title ,第二个有效的是.single-title But both are same styled. 但是两者风格相同。 I would be happy about some help. 我很乐意提供帮助。

Hi if you dont want to change the structure of the template you can add this css rules 嗨,如果您不想更改模板的结构,则可以添加此CSS规则

.page-id-21 .single-page{
    margin:0;
}
.page-id-21 .single-page .single-content{
    margin-left: 25px;       
}

I added a .page-id-21 class, otherwise in the contact page you will add a margin. 我添加了.page-id-21类,否则在联系页面中将添加边距。 This can be a solution, another is to search the correct template page, if it's a premium plugin it will have it, and you dont need to add the css rules. 这可能是一个解决方案,另一种方法是搜索正确的模板页面,如果它是高级插件,它将具有该页面,并且您无需添加css规则。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM