更改宽度过滤器输入框 primefaces 数据表

发布于 2024-12-27 21:23:52 字数 284 浏览 1 评论 0原文

您好,我如何在 primefaces 数据表中为过滤器输入框应用 ccs 样式,尝试以这种方式使用过滤器样式:

 <p:column styleClass="placaColumna" filterStyle="width=16px" headerText="Placa" filterBy="# 
 {bandeja.placa}"><h:outputText value ="#{bandeja.placa}"/></p:column>

谢谢:D

Hi how do i apply the ccs style for the filter inputbox in a primefaces datatable, trying to use filterstyle this way:

 <p:column styleClass="placaColumna" filterStyle="width=16px" headerText="Placa" filterBy="# 
 {bandeja.placa}"><h:outputText value ="#{bandeja.placa}"/></p:column>

thanks :D

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

↙温凉少女 2025-01-03 21:23:52

您的内联样式 CSS 语法不正确。应该是这样的。

filterStyle="width: 16px;"

Your inline style CSS syntax is incorrect. It should be like this.

filterStyle="width: 16px;"
甜味拾荒者 2025-01-03 21:23:52

您还可以使用带有选项filterStyleClass的CSS类

不要忘记在CSS类中使用!important

filterStyleClass="cssClass"

.cssClass{width: 16px !important}

You can also use an CSS class with the option filterStyleClass

Don't forget to use !important in your css class

filterStyleClass="cssClass"

.cssClass{width: 16px !important}
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文