Material Design Lite - Bottom Line in text field has a slight gap with colored line

匆匆过客 提交于 2019-12-01 06:55:55

I did face the same issue with MDL when used with boostrap and turns out the boostrap css file adds a margin of 5px to its bottom for the Label elment which creates a 5px gap.

JSFiddle-Recreating the issue

Code snippet from Bootstrap.css file

label {
  display: inline-block;
  max-width: 100%;
  margin-bottom: 5px;
  font-weight: bold;
}

Fix would be reduce the margin-bottom of the label element to 0px.

Fix- JsFiddle

.mdl-textfield__label{  
   margin-bottom:0px;
 }

Hope this helps.

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