I have been building a web application using Bootstrap 3. Within that, I used panels to group user elements - displaying data, simple edit forms etc.
I would use a dl with the label as a dt and the value as the dd.
Similarly, I would use forms with the labels inline with the fields
<div class="panel-body">
<dl class="dl-horizontal">
<dt>Name</dt>
<dd>Value</dd>
</dl>
</div>
I could use dl-horizontal just fine within the panel.
Now, however, with Bootstrap 4 panels have become cards, and the dl-horizontal class does not seem to have an effect.
<div class="card-body">
<div class="card-text">
<dl class="dl-horizontal">
<dt>Name</dt>
<dd>Value</dd>
</dl>
</div>
</div>
Update
Removed references to forms. I had initially had issues with form-horizontal as well, Bootstrap4 does horizontal forms differently
To get fully responsive behavior, use:
Because in Bootstrap 3 the
dl-horizontalclass only applied to sm+ screens, and it aligned the<dt>to the right.