Skip to content

Instantly share code, notes, and snippets.

@hansgafriedzal
Last active March 15, 2018 15:40
Show Gist options
  • Save hansgafriedzal/2d50d860fd03a7de0dd4c7ada3c21a69 to your computer and use it in GitHub Desktop.
Save hansgafriedzal/2d50d860fd03a7de0dd4c7ada3c21a69 to your computer and use it in GitHub Desktop.
tabulate list into 3 columns #html #css
<style>
ul.table {
width: auto !important;
margin-bottom: 0;
}
ul.table > * {
display: table-row;
}
ul.table > * > * {
display: table-cell;
}
ul.table > * > *:first-child {
display: list-item;
}
</style>
<ul class="table">
<li>
<div>label</div>
<div>&nbsp;:&nbsp;</div>
<div>value</div>
</li>
<li>
<div>long label</div>
<div>&nbsp;:&nbsp;</div>
<div>value</div>
</li>
<li>
<div>very long label</div>
<div>&nbsp;:&nbsp;</div>
<div>value</div>
</li>
</ul>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment