html - CSS wordpress中的中心文本

标签 html css wordpress

我是 CSS 的新手。

我在 Wordpress 中创建了一个网站,并制作了一个新的模板页面。 可以在 http://jobboard.jobsbe.be/test/ 找到

我添加了一些 CSS 以使页面看起来像我想要的,但有一件事我无法找到如何让它工作。

当您查看该页面时,您会看到我使用了一个分隔符,在两个分隔符之间有一个单词“OR”。

我已经尝试了我所知道的和在 Internet 上找到的所有内容,但我无法在两个分隔符之间找到“或”这个词。

谁知道我该怎么做?

这是我的CSS:

 /**
 * The parent theme's CSS is automatically included so there is no need
 * to use the @import rule to include the parent theme CSS.
 *
 * Place Custom CSS Below this.
 */

 /**Changing color of links footer*/
.widget--footer a {
    color: #7dc246;
}

/**Changing color of menu links*/
.nav-menu--primary ul li a, .nav-menu--primary li a {
    color: #7dc246;
}
.nav-menu--primary ul li a:hover, .nav-menu--primary li a:hover {
    color: #fff; background-color: #7dc246;
}

/**Changing style Login box*/
.nav-menu--primary ul li.highlight > a, .nav-menu--primary ul li.login > a {
    border-style: solid;
    border-width: 1px;
    border-color: #7dc246;
    color: #fff; 
    background-color: #7dc246;
}
.nav-menu--primary ul li.highlight > a:hover, .nav-menu--primary ul li.login > a:hover {
    border-style: solid;
    border-width: 1px;
    border-color: #7dc246;
    color: #7dc246;
}

/**Changing style menu on small screen*/
.primary-menu-toggle:before {
    color: #7dc246; background-color: #fff;
}

/**Buttons Signup Page*/
.btn.btn-primary.text-capitalize.m-0  {
    border-radius: 5px;
    background: #7dc246;
    color: #fff;
    padding: 15px; 
}

.o-or-divider {
    color: #7d7d7d;
    font-size: 20px;
    font-weight: bold;
    padding-top: 115px;
    text-align: center;
}

*, :after, :before {
    box-sizing: border-box;
}

.o-or-divider:before {
    top: -10px;
}

.o-or-divider:after, .o-or-divider:before {
    position: absolute;
    content: "";
    display: block;
    padding: 55px 0;
    border-left: 1px solid #7dc246;
    left: 80px;
}

*, :after, :before {
    box-sizing: border-box;
}

.o-or-divider:after {
    top: 155px;
}

.o-or-divider:after, .o-or-divider:before {
    position: absolute;
    content: "";
    display: block;
    padding: 55px 0;
    border-left: 1px solid #7dc246;
    left: 80px;
}

*, :after, :before {

    box-sizing: border-box;
}

最佳答案

分隔符没有正确居中,只需添加 left:50%;之前和之后:

 .o-or-divider:after, .o-or-divider:before {
   position: absolute;
   content: "";
   display: block;
   padding: 55px 0;
   border-left: 1px solid #7dc246;
   left: 50%;
}

关于html - CSS wordpress中的中心文本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42998691/

相关文章:

javascript - 将 javascript onclick 事件更改为 jquery click 并仍然传递参数

html - 元标记中 http-equiv = "pragma"和 http-equiv = "cache-control"的替代

css - 使用 Twitter Bootstrap 让页脚贴在页面底部

html - 插入表单到wordpress页面

wordpress - 自定义字段选择框 WordPress

php - WP MVC : How to edit and save records involving multiple tables

html - 谷歌字体问题

javascript - 单击以将 div 移动到鼠标坐标

javascript - 调整大小需要刷新

css - CSS 字体特性 "SS05"是什么意思?