If I'm not totally mistaken here, the only way to make that work cross browsers using CSS is to combine display: inline-block
with display: table-row
/display: table-caption
.
Stack snippet
.panel {
margin-bottom: 20px;
display: inline-block;
box-shadow: 0 2px 4px 0 #C6C2BF;
padding: 0.5rem 1rem 1rem;
}
.user-title {
display: table-row;
}
.panel > div {
display: table-caption;
caption-side: bottom;
}
<div class="panel">
<p class="user-title">Date 08.03.2018 User: Joe Doe</p>
<div>
<p>Some long text in the paragraph that is wider than the title above it</p>
<p>Another shorter text</p>
</div>
</div>
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…