【问题标题】:How do I add space between post titles in the Post Navigation Widget in Wordpress (ideally with some CSS)?如何在 Wordpress 的帖子导航小部件中的帖子标题之间添加空格(最好使用一些 CSS)?
【发布时间】:2021-08-22 22:27:15
【问题描述】:

我是 WordPress 和网站建设的新手。我无法在帖子底部的帖子导航小部件中的帖子标题之间添加空格。标题在中心相遇,阅读起来很混乱。理想情况下,我希望能够在多行中显示标题,但我可以在它们之间留一些空间并让它们消失在省略号中。

![这是它现在的样子。][1]

理想情况下,我想使用 CSS 来改变这个问题,但如果不可能的话,我很高兴学习如何使用其他代码来解决这个问题。非常感谢任何帮助!

这是我通过检查页面找到的 CSS 代码:

element.style {
}
.elementor-kit-1 {
--e-global-color-primary: #FFFFFF;
--e-global-color-secondary: #FD3A97;
--e-global-color-text: #4A4848;
--e-global-color-accent: #FDB589;
--e-global-color-ac96d9d: #999999;
--e-global-typography-primary-font-family: "Calibri Light";
--e-global-typography-primary-font-weight: 600;
--e-global-typography-secondary-font-family: "Roboto Slab";
--e-global-typography-secondary-font-weight: 400;
--e-global-typography-text-font-family: "Roboto";
--e-global-typography-text-font-weight: 400;
--e-global-typography-accent-font-family: "Roboto";
--e-global-typography-accent-font-weight: 500;
}
body, .site-title {
font-family: Nunito, var(--nv-fallback-ff);
}
body {
font-size: 16px;
}
body {
font-family: Graphik,-apple-system,BlinkMacSystemFont,Segoe UI,var(-- 
nv-fallback-ff);
color: var(--nv-text-color);
line-height: 1.68421;
overflow-x: hidden;
direction: ltr;
background-color: var(--nv-site-bg);
}
.nv-html-content p, blockquote, body, dd, dl, dt, fieldset, figure, 
h1, h2, h3, h4, h5, h6, hr, html, iframe, legend, li, ol, p, pre, 
textarea, ul {
margin: 0;
padding: 0;
}
*, :after, :before {
box-sizing: border-box;
-webkit-box-sizing: border-box;
}
user agent stylesheet
body {
display: block;
margin: 8px;
}
:root {
--e-global-color-nvprimaryaccent: #fd3a97;
--e-global-color-nvsecondaryaccent: #fdb589;
--e-global-color-nvsitebg: #fff;
--e-global-color-nvlightbg: #ededed;
--e-global-color-nvdarkbg: #14171c;
--e-global-color-nvtextcolor: #393939;
--e-global-color-nvtextdarkbg: #fff;
--e-global-color-nvc1: #f5e6de;
--e-global-color-nvc2: #4a4848;
}
:root {
--nv-primary-accent: #fd3a97;
--nv-secondary-accent: #fdb589;
--nv-site-bg: #fff;
--nv-light-bg: #ededed;
--nv-dark-bg: #14171c;
--nv-text-color: #393939;
--nv-text-dark-bg: #fff;
--nv-c-1: #f5e6de;
--nv-c-2: #4a4848;
--nv-fallback-ff: Arial , Helvetica , sans-serif;
}
:root {
--page-title-display: block;
}
html {
font-size: 100%;
overflow-x: hidden;
-webkit-tap-highlight-color: transparent;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
*, :after, :before {
box-sizing: border-box;
-webkit-box-sizing: border-box;
}
*, :after, :before {
box-sizing: border-box;
-webkit-box-sizing: border-box;

【问题讨论】:

  • 您是否查看过围绕该区域使用的 CSS(使用您的浏览器开发工具)?这应该给出一些想法,例如包含标题的元素的宽度。我们需要查看其中的一些代码才能提供帮助。
  • 嘿!感谢您的回复。我这样做了,尽管我自己还不能破译它。我编辑了帖子以包含我找到的 CSS。
  • @AHaworth 是我在您要查找的内容上方发布的 CSS?感谢您的帮助!:)
  • 嗨,这看起来不像,它看起来更像是造型的开始。你有指向我可以直接查看的网站的链接吗?
  • @AHaworth 抱歉,稍后回复。我愿意!我已将其设置为维护模式,但我可以将其打开以便您查看。

标签: css wordpress padding elementor


【解决方案1】:

这对我有用——

.post-navigation__prev--title {
    padding-right: 40px;
}

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2018-05-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多