# vertical centering

* :tools: [How to Center in CSS?](http://howtocenterincss.com)
* :point\_right: [vertical-align](vertical-align)

## 重點 <a href="#notes" id="notes"></a>

```css
/* inline element */
text-align: enter;

/* block element */
margin: 0 auto;

/* flex */
display: flex;
justify-content:center;
align-items:center;
```

## 參考 <a href="#ref" id="ref"></a>

{% tabs %}
{% tab title="📗 文章" %}
* [CSS Vertical Align - How to Center a Div, Text, or an Image](https://www.freecodecamp.org/news/css-vertical-align-how-to-center-a-div-text-or-an-image-example-code/) (freeCodeCamp)
{% endtab %}
{% endtabs %}
