[英]Bootstrap Validation Error Messages CSS
I am using Bootstrap 3 Popover Validation With JQuery . 我正在将Bootstrap 3 Popover验证与JQuery一起使用 。 I am facing the issue of the css. 我正在面对CSS的问题。 I have textboxes in table. 我的桌子上有文本框。 Validation is working fine the only issue is that unable to show error above the respective textbox. 验证工作正常,唯一的问题是无法在相应文本框上方显示错误。
. 。
The error in the above picture should points to the right textbox which i have highlighted but its not happening this way. 上图中的错误应指向我突出显示的正确文本框,但这种情况不会发生。 CSS I used for coloring is: 我用于着色的CSS是:
CSS CSS
.popover.error-popover {
background-color: #F2DEDE;
border-color: #EED3D7;
box-shadow: none;
color: #B94A48;
cursor: pointer;
max-width: none;
z-index: 1099;
}
</style>
JS code is: JS代码是:
$('#myform').validate_popover({onsubmit: false, popoverPosition: 'top'});
HTML The width of each textbox is 55. here is a structure of the above table. HTML每个文本框的宽度为55。这是上表的结构。
<form id="myform">
<table>
<tr>
<td>
<input style="width:55px" name="code" />
</td>
<td>
<input style="width:55px" id="type" name="type"/>
</td>
.
.
.
</tr>
</table>
</form>
You need to setup css definition for the arrow too: 您还需要为箭头设置css定义:
.popover.error-popover.top .arrow {
border-top-color: #EED3D7;
left: 30px;
}
Play around with colors (style.css) in this Plunker 在此Plunker中玩转颜色(style.css)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.