留言板

Conflicts between Custom theme CSS and Liferay CSS

manni java,修改在9 年前。

Conflicts between Custom theme CSS and Liferay CSS

New Member 帖子: 9 加入日期: 14-5-6 最近的帖子
I am trying to customize the Liferay UI by using custom theme using base as as "_Styled" theme.

I have my own css files which I coped to _diff/css folder of theme and imported them "custom.css" file .However its breaking the presentation of liferay.In my custom CSS I have styles defined for all the standard tags like body,div etc which is impacting the liferay UI too.

How can I resolve this conflict? Thanks in advance!
thumbnail
David H Nebinger,修改在9 年前。

RE: Conflicts between Custom theme CSS and Liferay CSS

Liferay Legend 帖子: 14919 加入日期: 06-9-2 最近的帖子
You assign portlet-specific classes to your html entities (i.e. through the liferay-portlet.xml file). That way you can narrow the CSS selectors so the styles only apply to your elements.
manni java,修改在9 年前。

RE: Conflicts between Custom theme CSS and Liferay CSS

New Member 帖子: 9 加入日期: 14-5-6 最近的帖子
Thanks for reply.I am adding all these portlets dynamically ,by specifying them in portal_normal.vm file. I do not have my custom portlet and hence do not have liferay-portlet.xml.

How can I specify styles for these kind of portlets?