# 我的类别名称左对齐了，如何居中？

**URL:** <https://meta.discourse.org/t/my-category-name-is-aligned-to-the-left-how-to-center-it/278665>\
**Category:** Support\
**Tags:** category-banners\
**Created:** [2023年九月12日 01:30 UTC](https://meta.discourse.org/t/my-category-name-is-aligned-to-the-left-how-to-center-it/278665 "2023-09-12T01:30:01Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sarah\_Jane\_Obligar](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sarah_jane_obligar/32/322409_2.png) [@Sarah\_Jane\_Obligar](https://meta.discourse.org/u/Sarah_Jane_Obligar)\
**Post date:** [2023年九月12日 01:30 UTC](https://meta.discourse.org/t/my-category-name-is-aligned-to-the-left-how-to-center-it/278665/1 "2023-09-12T01:30:01Z")

</div>

您好，我的类别名称在左侧对齐。您能帮我把它放在中间吗？当我在组件设置中预览时，它在中间。但是当我重新加载它时，它会恢复到左侧。谢谢您

---

<div class="post-metadata">

**Author:** ![Lilly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lilly/32/575047_2.png) [@Lilly](https://meta.discourse.org/u/Lilly)\
**Post date:** [2023年九月12日 01:35 UTC](https://meta.discourse.org/t/my-category-name-is-aligned-to-the-left-how-to-center-it/278665/2 "2023-09-12T01:35:56Z")

</div>

听起来您有另一个组件或一些 CSS 代码将其对齐到左侧。默认是居中，这就是为什么当您从组件预览时它会居中的原因。我建议删除一些可能与之冲突的其他主题组件，直到找到罪魁祸首，然后您可能需要进行一些代码更改或其他操作来修复它。

---

<div class="post-metadata">

**Author:** ![Sarah\_Jane\_Obligar](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sarah_jane_obligar/32/322409_2.png) [@Sarah\_Jane\_Obligar](https://meta.discourse.org/u/Sarah_Jane_Obligar)\
**Post date:** [2023年九月12日 01:40 UTC](https://meta.discourse.org/t/my-category-name-is-aligned-to-the-left-how-to-center-it/278665/3 "2023-09-12T01:40:00Z")

</div>

您好，谢谢 🙂 我通过删除其中一个组件解决了它 🙂

---

<div class="post-metadata">

**Author:** ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)\
**Post date:** [2024年四月8日 15:43 UTC](https://meta.discourse.org/t/my-category-name-is-aligned-to-the-left-how-to-center-it/278665/4 "2024-04-08T15:43:49Z")

</div>

3 个帖子已拆分为新主题：[Category image not aligning as expected](https://meta.discourse.org/t/category-image-not-aligning-as-expected/302890)

---

<div class="post-metadata">

**Author:** ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)\
**Post date:** [2024年四月8日 15:44 UTC](https://meta.discourse.org/t/my-category-name-is-aligned-to-the-left-how-to-center-it/278665/5 "2024-04-08T15:44:41Z")

</div>


