JSFiddle - React, Tailwind, and code Playground

by krisselden

HTML

<div class="container">
    <div class="left-label-text">
        <span class="label">Location:</span>
        <span class="text">Home</span>
    </div>
<hr>
    <div class="left-label-text">
        <span class="label">Address:</span>
        <span class="text">1123 1st Ave<br>
        Seattle, WA 98109</span>
    </div>
<hr>
    <div class="left-label-text">
        <span class="label">Time:</span>
        <span class="text">Nov 1, 2012<br>12pm</span>
    </div>
<hr>
    <div class="left-label-text">
        <span class="label">Info:</span>
        <span class="text">What if I have a lot of text here that people need to read. What if I have a lot of text here that people need to read. What if I have a lot of text here that people need to read.</span>
    </div>
</div>

CSS

.container {
    text-align: center;
}
.left-label-text {
    display: inline-block;
    white-space: nowrap;
    text-align: left;
    width: 100%;
    right: -22%;
    position: relative;
}

.label {
    text-align: right;
}

.text {
    display: inline-block;
    max-width: 50%;
    text-align: left;
    white-space: normal;
    vertical-align: top;
}