html - 问题下方的单选按钮未与其对齐
问题描述
我一直在尝试对齐问题开头下方的单选按钮的位置,但似乎没有什么对我有用。
这是我的代码:
<div class="form-row" [style.display]="this.Form.value.joiningAs == '2' || this.Form.value.joiningAs == '3' ? 'block' : 'none'">
<div class="col-md-12 mb-3">
<label for="hasProfile">
Has your company created their profile on our platform?
</label>
<div class="form-check">
<label class="form-check-label">
<input type="radio" class="radio" name="hasCompanyProfile" value="1" formControlName="hasCompanyProfile"
[(ngModel)]="Form.value.hasCompanyProfile">
Yes
</label>
</div>
<div class="form-check">
<label class="form-check-label">
<input type="radio" class="radio" name="hasCompanyProfile" value="2" formControlName="hasCompanyProfile"
[(ngModel)]="Form.value.hasCompanyProfile">
No
</label>
</div>
</div>
</div>
任何帮助将不胜感激。我在这件事上花费了太多时间。
解决方案
因此,您想将左侧的单选按钮与文本对齐吗?
.form-check-label > input {
margin-left: 0;
}
我希望能解决你的问题
推荐阅读
- c# - 子窗口可见性 DataTrigger 不起作用
- c - 如何使用 Codeblocks 中的 files.h 使 c 程序模块化?
- android - 如何使用来自android服务器端的地图标记计算HERE地图(Premium sdk)android中不同航点的距离
- jsp - 在 jsp 中使用 javaBeans 标记的类名无效
- python - 替换不启动新子进程的 Popen
- arrays - c中的二维矩阵乘法
- php - 在 WooCommerce 中插入自定义总计,不包括购物车上的产品成本行和结帐总计
- angular - 如何在 FormGroup 中使用 FormArray
- algorithm - 从时间复杂度生成多项式函数
- php - 从 Laravel 中的 json 对象处理 zulu 日期时间