Study

Contents

Basics of CSS



Flexbox

Usually Flexbox is always used with items (div, ul, etc) within a container class(div, nav, etc), eg:

<div class="flex-container">
    <div>1</div>
    <div>2</div>
    <div>3</div>
</div>

<style>
    .flex-container {
        display: flex; // by default items will be aligned horizontally
    }
    .flex-container div {
        background-color: DodgerBlue;
        color: white;
        width: 100px;
        margin: 10px;
        text-align: center;
    }
</style>

Flexbox container properties and their values:

Flex items properties and their values:

Credits / Notes taken from:

Other great resources: