1
0
mirror of https://github.com/phuoc-ng/csslayout.git synced 2025-10-23 18:56:29 +02:00
Files
csslayout/contents/button-with-icon.md
2022-10-02 17:36:49 +07:00

605 B

layout, title, description, keywords
layout title description keywords
layouts/post.njk Button with icon Create an icon button with CSS flexbox css flexbox, css icon button

HTML

<button class="button-with-icon">
    <!-- Icon -->
    ...

    <!-- Label -->
    <div class="button-with-icon__label">...</div>
</button>

CSS

.button-with-icon {
    /* Center the content */
    align-items: center;
    display: flex;
    flex-direction: row;
    justify-content: center;
}

.button-with-icon__label {
    margin-left: 0.5rem;
}

{% demo %} {% include "covers/button-with-icon.njk" %} {% enddemo %}