# Comment modifier le style des catégories ?

**URL:** <https://meta.discourse.org/t/how-to-change-categories-style/78067>\
**Category:** UX\
**Created:** [Janvier 15, 2018, 1:52 UTC](https://meta.discourse.org/t/how-to-change-categories-style/78067 "2018-01-15T13:52:18Z")\
**Posts on this page:** 1\
**Showing post:** 34

<div class="post-metadata">

**Author:** ![londonstuff.meli](https://avatars.discourse-cdn.com/v4/letter/l/9d8465/32.png) [@londonstuff.meli](https://meta.discourse.org/u/londonstuff.meli)\
**Post date:** [Août 3, 2020, 2:04 UTC](https://meta.discourse.org/t/how-to-change-categories-style/78067/34 "2020-08-03T14:04:26Z")

</div>

> [@Johani](#):
>
> ```plaintext
> .categories-and-latest {
> flex-direction: column;
> }
> 
> .category-list {
> thead,
> .topics,
> .subcategories,
> .category-description {
> display: none;
> }
> 
> tbody {
> text-align: center;
> 
> tr {
> display: inline-block;
> width: 250px;
> height: 250px;
> margin: 0.75em;
> border: 1px solid rgba(0, 0, 0, 0.1) !important;
> border-left-color: transparent;
> 
> }
> 
> .category {
> padding: 0;
> border-width: 0;
> display: block;
> width: 100%;
> height: 100%;
> position: relative;
> 
> > div {
> height: 100%;
> background: #f2f2f2;
> }
> 
> .category-logo {
> float: unset;
> margin: 0 auto;
> }
> 
> .category-name {
> margin-top: 1.25em;
> }
> 
> h3 {
> position: absolute;
> top: 50%;
> left: 50%;
> transform: translate(-50%, -50%);
> 
> a[href] {
> display: flex;
> flex-direction: column-reverse;
> width: 250px;
> }
> }
> 
> &:after {
> position: absolute;
> width: 100%;
> height: 100%;
> top: 0;
> left: 0;
> content: "";
> z-index: 1;
> box-sizing: border-box;
> pointer-events: none;
> border-left: 6px solid;
> opacity: 0.35;
> border-color: inherit;
> }
> }
> }
> }
> 
> ```

Pour une raison inconnue, lorsque j’utilise exactement le même code, le texte n’est pas centré dans la boîte. En revanche, les images le sont. J’ai essayé de saisir le texte, mais les images bougent avec le texte. Quelqu’un sait ce que je fais de mal ?

---

_[View the full topic](https://meta.discourse.org/t/how-to-change-categories-style/78067)._
