thanks for taking a look at my question. I am new to CSS and html and am attempting to create a skeleton web page. I am attempting to create a page with flexbox it has two SIDE BY SIDE rows, each with a nested column. The issue arises when I try to stretch the columns to the "parent height/number of columns" this is proving to be a difficult issue that has no easy solution (at least from what. for example, a column with two articles would need a height of 50% of the parent div, so the column fully fills it. with 3 items the articles must be 33% height to make the column fill the row.
Example illustration (2 rows, the left with one column item, the right with two.
OOOOOOOOOOOOOOOOOOOO
O--text--O---text--O
O--text--O--empty--O
O--text--O--empty--O
O--text--OOOOOOOOOOO
O--text--O---text--O
O--text--O--empty--O
O--text--O--empty--O
OOOOOOOOOOOOOOOOOOOO
How it currently looks:
OOOOOOOOOOOOOOOOOOOO
O--text--O --text--O
O--text--OOOOOOOOOOO
O--text--O --text--O
O--text--OOOOOOOOOOO
O--text--O--empty--O
O--text--O--empty--O
O--text--O--empty--O
OOOOOOOOOOOOOOOOOOOO
Can i do this with Java, and if so; Would somebody be able to lend me their wisdom?
My current code is:
.container {
border: 1px red solid;
width: 80%;
margin: 100px auto 0 auto;
height: 500px;
/*height: auto; */
position: relative;
}
section {
background-color: #cccccc20;
position: absolute;
width: 100%;
height: 100%;
display: flex;
}
.row {
flex: 1;
border: 1px black solid;
height: 100%;
}
.col {
column-fill: balance;
border: 1px red solid;
}
.article {
display: table-cell;
}
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="style/style.css">
<link rel="stylesheet" href="style/structure.css">
<title></title>
</head>
<body class="container">
<section>
<div class="row">
</div>
<div class="row">
<div class="col">
<div class="article">
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
</div>
</div>
<div class="col">
<div class="article">
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
</div>
</div>
</div>
</section>
</body>
</html>