jquery - Bootstrap 3 : Show the error message with fixed Grid Layout

标签 jquery html css twitter-bootstrap

我尝试使用 help-block 类在字段下方显示必填字段错误消息。
这是它最初看起来没有错误的样子:jsfiddle
我对网格布局有疑问:

Thanks for telling how put help text after the badge. But my issue keeping the grid intact.


问题: 如何保持网格布局完整?添加错误消息后就是它的样子。

Should I increase the row height?

之前 enter image description here

之后 enter image description here

最佳答案

您要在输入和徽章之间插入帮助 block ,您可以改为这样做:

$(this).closest('div').append("<p class='help-block'>Example block-level help text here.</p>");

我还建议您对水平表单使用适当的标记(而不是多个 .form-inline),阅读 the docs了解更多信息

关于jquery - Bootstrap 3 : Show the error message with fixed Grid Layout,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18663091/

相关文章:

jQuery - 计算图像数量,然后包装一定数量的图像

jquery - 基于ajax请求在radio选项后附加div

html - Symfony2 自定义表单字段类型 HTML5 颜色

javascript - 想要将 HTML 元素的颜色从红色更改为绿色,然后再次更改为红色

HTML:两行文本居中垂直对齐

html - 如何在 <div> 中将绝对定位的 <img> 居中但保持原始纵横比

javascript - 动态验证——只需一个附加

html - 在特定字符上对齐文本

CSS - 背景图像拉伸(stretch)

javascript - jQuery 在我的页面上显示其他用户