A191919
A191919

Reputation: 3442

Display flex align to left

How to align <div class="Text">Some text</div> to left?

    .navigation {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        width: 100%;
        height: 80px;
        background: rgb(255,255,255);
    }
    ul {
        list-style:none;
        /*float:right;*/
    }
    li {
        display:inline-block;
    }
    a {
        padding: 10px;
        width: 80px;
        text-decoration: none;
        display: block;
        text-align: center;
    }
    a:hover{
        background:lightgreen;
    }
<div class="navigation">
    <div class="Text">Some text</div> 
    <ul>
        <li><a>Contacts</a></li>
        <li><a>About</a></li>
        <li><a>FAQ</a></li>
        <li><a>Other</a></li>
    </ul>
</div>

Upvotes: 1

Views: 375

Answers (2)

morshed
morshed

Reputation: 315

Use this snippet

.Text {
    display: flex;
    justify-content: flex-start;
    flex-grow: 1;
}

Upvotes: 1

MuFFes
MuFFes

Reputation: 322

.Text {
margin-right: auto;
} 

Should work

Upvotes: 3

Related Questions