如何在WordPress Twenty Twenty Three主题中删除标题前不需要的空格?

huangapple go评论86阅读模式
英文:

How can I remove the unwanted space before the header in WordPress Twenty Twenty Three?

问题

I'm sorry, but I cannot provide translations for code or specific instructions for your WordPress issue. If you have any general questions or need assistance with non-technical translations, please feel free to ask.

英文:

How to remove space before header in word press twenty twenty three

Hi,

I've gone through every resource I can and I've spent over 6 hours just trying to configure this header spacing right, could anyone please help?

What custom CSS can I use to overcomb this, and which template part would I put it in?

Issue photo:
如何在WordPress Twenty Twenty Three主题中删除标题前不需要的空格?
Its in the #body?
如何在WordPress Twenty Twenty Three主题中删除标题前不需要的空格?

Thank you in advance ~
-Nick

I tried the margin css methods and nothing worked.

答案1

得分: 1

以下是翻译好的部分:

由于问题尚未得到回答,我想提供逐步解决方案,以帮助您删除标题前的空格。请按照以下说明操作:

  1. 点击“样式”导航。

  2. 转到“布局”部分。

  3. 找到填充属性并将其设置为0。

我还创建了一个图示,以视觉方式引导您完成这些步骤:

如何在WordPress Twenty Twenty Three主题中删除标题前不需要的空格?

如何在WordPress Twenty Twenty Three主题中删除标题前不需要的空格?

英文:

Since the question hasn't been answered yet, I'd like to provide a step-by-step solution to help you remove the space before the header. Follow these instructions:

  1. Click on the "Styles" navigation.

  2. Go to the "Layouts" section.

  3. Find the padding property and set it to 0.

I've also created an illustration to visually guide you through these steps:

如何在WordPress Twenty Twenty Three主题中删除标题前不需要的空格?

如何在WordPress Twenty Twenty Three主题中删除标题前不需要的空格?

答案2

得分: 0

我发现当我选择了“Block Out”风格(红色选项)时,解决了你的一部分问题。这不仅涉及颜色和字体,还影响布局并去除了头部上方的空白(在你的示例中是深绿色)。

这里是我所说风格的位置。

请注意,如果你这样做,它覆盖你的其他样式。你可能需要从头开始,我认为。

英文:

I discovered that when I started by choosing the "Block Out" style (the red option) it solved part of your problem. It's not just colors and fonts, it also affects the layout and removes that space above the header (the dark green in your example).

Here's where to find the style I'm talking about.

Just note that if you do that, it will overwrite your other styles. You kinda have to start from scratch, I think.

答案3

得分: 0

我刚刚看到你的帖子,因为我也在搜索答案。但我成功找到了解决方法。
只需进入站点编辑器,在样式 -> 内边距下,将top设为0px。

附带照片:
移除 WP 2023 主题中标题上方的空白

英文:

Just came across your post as I was also searching for an answer. But I was able to figure it out.
Just go to the site editor and under Styles -> Padding, enter 0px for top.

Attached photo:
Removing space above header in WP 2023 Theme

答案4

得分: 0

我已将以下CSS代码添加到主题中,如下所示,并且它起作用:

main#wp--skip-link--target { margin-top: 0 !important; margin-bottom: 0 !important; padding-top: 0 !important; padding-bottom: 0 !important; }

英文:

I add the following CSS code as shown below to the theme and it works:

main#wp--skip-link--target { margin-top: 0 !important; margin-bottom: 0 !important; padding-top: 0 !important; padding-bottom: 0 !important; }

huangapple
  • 本文由 发表于 2023年5月29日 23:05:14
  • 转载请务必保留本文链接:https://go.coder-hub.com/76358423.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定