WordPress 主题:包装条目标题?
我正在为主题框架开发一个自定义子主题。
我在调整帖子标题时遇到问题。当他们换行到第二行时,他们打乱了我约会的位置。
您可以在此处查看示例: http://everydaytype.com/wp
在顶部条目,这是一行长,日期和条目标题对齐。
在接下来的两个条目中,标题换行至第二行并取代日期。
我尝试过使用条目日期和条目标题的相对和绝对定位,但无济于事。我尝试过调整高度和线条高度。我尝试过显示:内联变体。
我正在使用 Firebug 来揭示影响这两个元素的 CSS,但尚未能够使任何内容发挥作用。
明确地说,我的目标是能够拥有任意长度的条目标题,并使它们与顶部条目上的日期保持一致。
任何想法将不胜感激。
I'm developing a custom child theme for the Thematic Framework.
I'm having trouble with the alignment of my post titles. When they wrap onto a second line, they mess up the positioning of my date.
You can see an example here: http://everydaytype.com/wp
On the top entry, which is one line long, the date and the entry title are aligned.
On the second two following entries, the title wraps to a second line and displaces the date.
I've tried playing with the relative and absolute positioning of both the entry date and the entry title to no avail. I've tried playing with the height and the line height. I've tried display:inline variants.
I'm using Firebug to reveal the CSS that affects both elements, but haven't yet been able to make anything work.
My goal, to state it clearly, is to be able to have entry titles of any length and keep them aligned with the date like on the top entry.
Any ideas would be greatly appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以尝试将
before 放在 html 代码本身的
之前。 (在您的主题文件之一中)。
然后应用以下样式:
you can try to place the
<span class="entry-date">
before the<h2>
in the html code itself. (in one of your theme files).then apply the following styles: