Recently, I've been delving into the world of Flex to experiment with some unique layouts.
However, I encountered an issue where my divs were not recognizing widths as expected.
I attempted to set the first div of each row to 5% width so they would align neatly on the left side
Even after trying both 5% and 5vw widths, nothing seemed to change.
I plan to organize them into classes eventually, but for now, my priority is to get them working correctly.
The parent div also has a width of 100%, providing a helpful reference point.
This is My HTML:
<!DOCTYPE html>
<html>
<head>
<title></title>
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet" media="all">
<style type="text/css">
/* Grid styles */
.column {
/*flex-basis: 100%;*/
}
@media screen and (min-width: 800px) {
.row {
display: flex;
flex-direction: row;
flex-wrap: nowrap;
}
.column {
flex: 1;
}
._25 {
flex: 2.5;
}
._5 {
flex: 5;
}
}
/**
{
border: 1px dashed red;
}*/
</style>
</head>
<body>
<!-- Personal user row -->
<div class="row" style="height: 30vh; border-bottom: 1px solid black; width: 100%;">
<div class="column" style="background-color: pink; width: 5%; display: flex; justify-content: center; align-items: center;">
<span style="font-size: 18pt" class="fa fa-user"> </span>
</div>
<div class="column" style="background-color: red; justify-content: center; align-items: center; padding-top: 1em;">
<div> </div>
</div>
</div>
<!-- User info/Settings row -->
<div class="row" style="height: 30vh; border-bottom: 1px solid black; width: 100%;">
<div class="column" style="background-color: purple; width: 5%; display: flex; justify-content: center; align-items: center;">
<span style="font-size: 18pt" class="fa fa-cog"> </span>
</div>
<div class="column" style="background-color: red; padding-top: 1em;"> </div>
<div class="column" style="background-color: red; padding-top: 1em;"> </div>
</div>
<!-- Messages/Chat row -->
<div class="row" style="height: 25vh; width: 100%;">
<div class="column" style="background-color: salmon; width: 5%; display: flex; justify-content: center; align-items: center;">
<span style="font-size: 18pt" class="fa fa-comment"> </span>
</div>
<div class="column" style="background-color: red; padding-top: 1em;">
<div> </div>
<div> </div>
</div>
</div>
<!-- End Main Body Area -->
</body>
</html>