align flex item to right
xxxxxxxxxx
.flex-parent{
display: flex;
justify-content: end;
}
.align-to-right-child{
margin-left: auto; /* ALIGNS TO RIGHT */
}
how to align flex item to right
xxxxxxxxxx
.primary-nav {
display:-webkit-flex;
display:flex;
list-style-type:none;
padding:0;
justify-content:flex-end;
}
.left {
margin-right:auto;
}
xxxxxxxxxx
<!DOCTYPE html>
<html>
<head>
<style>
.flex-container {
display: flex;
height:400px;
flex-flow: column wrap;
background-color: green;
align-content: flex-end;
}
.flex-container > div {
background-color: #fff;
width: 100px;
margin: 10px;
text-align: center;
line-height: 75px;
font-size: 30px;
}
</style>
</head>
<body>
<div class="flex-container">
<div>1</div>
<div>2</div>
<div>3</div>
<div>4</div>
<div>5</div>
<div>6</div>
<div>7</div>
<div>8</div>
</div>
</body>
</html>