I'm modifying a portfolio module that displays in list view with flexbox, however, I'm having trouble finessing the last child in the flexbox where I'd like it. I feel like this should be possible, put perhaps my approach is a bit off.
I've tried wrapping the .post-tag
div in it's own flexbox container and using margin-left: auto;
, and while it justifies it where I want, it's not exactly what I'm looking for since there's a void underneath everything occupied by the auto-margin. I'm still playing around in a JS fiddle with other potential solutions.
.parent {
display: flex;
flex-direction: column;
}
.container {
display: flex;
flex-direction: column;
border-bottom: solid 1.5px #4b0fff;
flex: 1;
}
.inner-container {
padding: 10px;
}
.post-tag {
font-style: italic;
}
<div class="parent">
<div class="container">
<div class="inner-container">
<div>
<p>Client Here</p>
</div>
<h2>Title Here</h2>
<div>Subtitle Here</div>
<p>Sint praesentium et deleniti quod dolore dignissimos impedit. Ut autem tempore quidem debitis necessitatibus alias culpa. Delectus sunt pariatur eum aut aperiam quia et quibusdam. Nemo exercitationem iusto consequatur.</p>
<p class="post-tag">Post Tag</p>
</div>
</div>
<div class="container">
<div class="inner-container">
<div>
<p>Client Here</p>
</div>
<h2>Title Here</h2>
<div>Subtitle Here</div>
<p>yadayada</p>
<p class="post-tag">Post Tag</p>
</div>
</div>
<div class="container">
<div class="inner-container">
<div>
<p>Client Here</p>
</div>
<h2>Title Here</h2>
<div>Subtitle Here</div>
<p>Sint praesentium et deleniti quod dolore dignissimos impedit. Ut autem tempore quidem debitis necessitatibus alias culpa. Delectus sunt pariatur eum aut aperiam quia et quibusdam. Nemo exercitationem iusto consequatur.</p>
<p class="post-tag">Post Tag</p>
</div>
</div>
</div>
https://jsfiddle.net/7nLjwm65/2/
As you can see in the fiddle above everything shows in a single column, however, I'd like the last child of the .inner-container
to sort of be in a separate column to the right. Please see the screenshot below for a visual of what I'm trying to achieve.
Notice that the tags should be centered relative to the other content to the left and be flexible enough to remain so with multiple tags.
Thanks in advance for any and all responses.