MVC Html.LabelFor tooltip

那年仲夏 提交于 2020-01-30 12:11:18

问题


Trying find out how to add a bit more space between the icon and the text

<td>@Html.LabelFor(m => m.MiscellaneousSettings.StudentPhotoUrl, new { @class = "fa fa-question-circle", Title = "SomeTooltips" }) </td>

As you can see its really close:


回答1:


Add this in your css:

label.fa:before {
  margin-right: 5px;
}

Which will result in:

See this JSFiddle.




回答2:


Add a space before the student photo URL

<td>@Html.LabelFor(m => "&nbsp;" + m.MiscellaneousSettings.StudentPhotoUrl, new { @class = "fa fa-question-circle", Title = "SomeTooltips" }) </td>


来源:https://stackoverflow.com/questions/39759081/mvc-html-labelfor-tooltip

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!