Witam wszystkich forumowiczów :)
Uczę się pisania stronek od niedawna ( niecałe 2 miesiące) i dotarłem do zagadnienia flexbox. Bardzo podoba mi się sposób działania tej funkcji, jednak nie potrafię jej ogarnąć. Chciałbym stworzyć layout z sześciu kolumn, jedna duża po lewej stronie ( wypełniająca połowę strony ). Po prawej stronie 5 kolumn jedna pod drugą, a gdy zostanie ona wyświetlona na telefonie chciałbym żeby wszystkie kolumny były też jedna pod drugą. Dziękuje za dobre rady :)
Zamieszczam kod moich zmagań ;)
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
.left-contanier {
position: fixed;
width: 100%;
height: 100%;
display: flex;
}
.right-contanier {
position: fixed;
display: flex;
width: 100%;
height: 50%;
flex-direction: column;
}
.col-1 {
width: 50%;
height: 100%;
background: yellow;
display: flex;
}
.col-2 {
width: 50%;
height: 20%;
background: green;
display: flex;
}
.col-3 {
width: 50%;
height: 20%;
background: purple;
display: flex;
}
.col-4 {
width: 50%;
height: 20%;
background: orange;
display: flex;
}
.col-5 {
width: 50%;
height: 20%;
background: pink;
display: flex;
}
.col-6 {
width: 50%;
height: 20%;
background: blue;
display: flex;
}
</style>
<!DOCTYPE html>
<html lang='en'>
<head>
<meta charset='UTF-8' />
<title>Janusz Cssu</title>
<link rel='stylesheet' href='styles.css' />
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1.0' />
<link href="https://fonts.googleapis.com/css?family=PT+Sans" rel="stylesheet">
</head>
<body>
<div class="left-contanier">
<div class="col-1"></div>
</div>
<div class="right-contanier">
<div class="col-2"></div>
<div class="col-3"></div>
<div class="col-4"></div>
<div class="col-5"></div>
<div class="col-6"></div>
</div>
</body>
</html>