mirror of
https://github.com/twbs/bootstrap.git
synced 2022-11-09 12:25:43 -05:00
Override padding on radio input label (#24899)
We could tell folks to nix the class, we could tell them to override it, or we could add another modifier of some kind to address this. None of them seem particularly useful, but the padding override feels the most approachable and clearly documentable. Added this here to close #24844.
This commit is contained in:
parent
c2c0eebd43
commit
a649c7f208
1 changed files with 3 additions and 1 deletions
|
@ -364,6 +364,8 @@ Create horizontal forms with the grid by adding the `.row` class to form groups
|
|||
|
||||
Be sure to add `.col-form-label` to your `<label>`s as well so they're vertically centered with their associated form controls. For `<legend>` elements, you can use `.col-form-legend` to make them appear similar to regular `<label>` elements.
|
||||
|
||||
At times, you maybe need to use margin or padding utilities to create that perfect alignment you need. For example, we've removed the `padding-top` on our stacked radio inputs label to better align the text baseline.
|
||||
|
||||
{% example html %}
|
||||
<form>
|
||||
<div class="form-group row">
|
||||
|
@ -380,7 +382,7 @@ Be sure to add `.col-form-label` to your `<label>`s as well so they're verticall
|
|||
</div>
|
||||
<fieldset class="form-group">
|
||||
<div class="row">
|
||||
<legend class="col-form-legend col-sm-2">Radios</legend>
|
||||
<legend class="col-form-legend col-sm-2 pt-0">Radios</legend>
|
||||
<div class="col-sm-10">
|
||||
<div class="form-check">
|
||||
<label class="form-check-label">
|
||||
|
|
Loading…
Reference in a new issue