# 如何将分类图标左对齐？

**URL:** https://meta.discourse.org/t/how-to-make-the-category-logo-left-aligned/304087
**Category:** Development
**Tags:** css
**Created:** [2024年四月16日 12:44 UTC](https://meta.discourse.org/t/how-to-make-the-category-logo-left-aligned/304087 "2024-04-16T12:44:01Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![ogulcan1787](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ogulcan1787/32/128589_2.png) [@ogulcan1787](https://meta.discourse.org/u/ogulcan1787)
#### Post date: [2024年四月16日 12:44 UTC](https://meta.discourse.org/t/how-to-make-the-category-logo-left-aligned/304087/1 "2024-04-16T12:44:01Z")

</div>

大家好 🤗

我该如何做到像这样？

 ![Ekran görüntüsü 2024-04-16 154057](https://global.discourse-cdn.com/meta/original/4X/1/7/0/170956975fba1a4b479f80eb0c7d01403715d82c.png)

这是暴雪的论坛网站。我在那里查找了 CSS 代码，但没有找到。

---

<div class="post-metadata">

### Author: ![ogulcan1787](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ogulcan1787/32/128589_2.png) [@ogulcan1787](https://meta.discourse.org/u/ogulcan1787)
#### Post date: [2024年四月18日 12:38 UTC](https://meta.discourse.org/t/how-to-make-the-category-logo-left-aligned/304087/2 "2024-04-18T12:38:55Z")

</div>

我可以只通过支付费用来执行此类程序，还是可以由以前做过这件事的人分享给我？

---

<div class="post-metadata">

### Author: ![ogulcan1787](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ogulcan1787/32/128589_2.png) [@ogulcan1787](https://meta.discourse.org/u/ogulcan1787)
#### Post date: [2024年四月19日 13:34 UTC](https://meta.discourse.org/t/how-to-make-the-category-logo-left-aligned/304087/3 "2024-04-19T13:34:42Z")

</div>

我做到了 🙂

您根据您的网站进行更改。  
例如，将 margin-left 更改为 `margin-left: 5.2rem;`

```plaintext
.categories-list .category .category-logo.aspect-image {
    margin-top: -1.2em;
}

.categories-list .category .category-logo.aspect-image img {
    width: 60px;
}

.category-logo.aspect-image {
    float: left;
    margin: .33em 0.7em 2em 0;
}

 .category-name:first-child {
    margin-left: 4.9rem !important;
    -webkit-margin-left: 3rem !important;
    -moz-margin-left: 3rem !important;
}

.category-list .subcategories {
    margin-left: 4.7rem;
}

```
