A D
A D

Reputation: 307

How to override the CSS classes into a Liferay SearchContainer?

Working on a Liferay 6.2 portlet that displays a search container into a JSP page. Is it possible to override the SearchContainer CSS classes?

I set a simple CSS class:

.green_background {
    background-color: #7AF20A;
}

I tried to apply it on a SearchContainer column:

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

And it does not override the search container classes.

Upvotes: 2

Views: 2109

Answers (2)

Daniele Baggio
Daniele Baggio

Reputation: 2257

Be care about css cascading rules and preset bootstrap/liferay styles. Use the more precise css rule.

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

Upvotes: 0

Rafik BELDI
Rafik BELDI

Reputation: 4158

You need to start your Css reference by the top css class aui , otherwise it will be overrided, check liferay-documentation

.aui .green_background {
    background-color: #7AF20A;
     }

Upvotes: 0

Related Questions