Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/jsp/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何将CSS类重写到Liferay SearchContainer中?_Css_Jsp_Liferay_Portlet - Fatal编程技术网

如何将CSS类重写到Liferay SearchContainer中?

如何将CSS类重写到Liferay SearchContainer中?,css,jsp,liferay,portlet,Css,Jsp,Liferay,Portlet,使用Liferay 6.2 portlet将搜索容器显示到JSP页面中。是否可以覆盖SearchContainer CSS类 我设置了一个简单的CSS类: .green_background { background-color: #7AF20A; } 我尝试将其应用于SearchContainer列: <liferay-ui:search-container-column-text property="incFg_isClosed" name="Type" cssClass=

使用Liferay 6.2 portlet将搜索容器显示到JSP页面中。是否可以覆盖SearchContainer CSS类

我设置了一个简单的CSS类:

.green_background {
    background-color: #7AF20A;
}
我尝试将其应用于SearchContainer列:

<liferay-ui:search-container-column-text  property="incFg_isClosed" name="Type" cssClass="span1 green_background "  orderable="true" orderableProperty="incFg_isClosed" />


并且它不会覆盖搜索容器类。

您需要通过顶级Css类
aui
启动Css引用,否则它将被覆盖,请检查


注意css级联规则和预设的引导/liferay样式。 使用更精确的css规则

.aui .table-striped tbody>tr>td.green_background {
    background-color: #7AF20A;
}

@你能检查一下你的浏览器并告诉我哪里出了问题吗?:我用Chrome开发工具和Firefox控制台进行了测试。与此相关,我没有特别的错误…@AD我想检查属性是否应用于所需的字段或是否被覆盖,我不知道您期望的行为,因为背景颜色:#7AF20A不适用,我认为SearchContainer类仍然覆盖我的类?@AD
search container column text
是文本标签,将css应用到更高级别,如
search container
,以查看它是否有效。
.aui .table-striped tbody>tr>td.green_background {
    background-color: #7AF20A;
}