Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Override padding on radio input label #24899

Merged
merged 2 commits into from
Nov 29, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion docs/4.0/components/forms.md
Original file line number Diff line number Diff line change
Expand Up @@ -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">
Expand All @@ -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">
Expand Down