Change the padding not the margin. I am basing this off of the colours used in the chrome debugger box model. The green bit is margin with the blue content inside.
Solution 1 :
Problem :
I am encountering an issue with this annoying margin that form-group has.
Here is my HTML:
<div class="form-group col-md-4">
<label>End Time <span style="color: red">*</span></label>
@Html.TextBoxFor(x => x.FormModel.EndDateTime, new { @class = "form-control timepicker" })
</div>
I have tried
.form-group col-md-4 {
margin-left: 0px !important;
}
.form-group {
margin-left: 0px !important;
}
However, when I do
.form-group {
margin-bottom: 0px;
}
It works, but this is unrelated to what I am wanting to do.
Here is what I am wanting to get rid of: Margin-Left
Comments
Comment posted by minimal reproducible example
What version of Bootstrap are you using? And please post a
Comment posted by CodyB1150
I am using Boostrap4. And I read that thread and still don’t know how to make a reproducible example. Seems a bit overboard for just removing a margin
Comment posted by CodyB1150
Thank you! It worked for me. I don’t know how I didn’t notice that haha.