Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
tong123123 tong123123
How to namespace css selector?
October 3, 2012 8:54 PM
Answer

tong123123 tong123123

Rank: New Member

Posts: 23

Join Date: August 10, 2012

Recent Posts

I know portlet css need namespaced to prevent selector collision with other portlet, but how to namespaced css?
Mayur Patel
RE: How to namespace css selector?
October 4, 2012 12:19 AM
Answer

Mayur Patel

Rank: Expert

Posts: 349

Join Date: November 17, 2010

Recent Posts

you need to make entry in liferay-portlet.xml and Inside css you need to use same name which is specified below ,

<css-class-wrapper>portletName</css-class-wrapper>

.portletName{
// specify all portlet specific css property inside this
}

Thanks.
tong123123 tong123123
RE: How to namespace css selector?
October 18, 2012 8:10 PM
Answer

tong123123 tong123123

Rank: New Member

Posts: 23

Join Date: August 10, 2012

Recent Posts

Mayur Patel:
you need to make entry in liferay-portlet.xml and Inside css you need to use same name which is specified below ,
<css-class-wrapper>portletName</css-class-wrapper>
.portletName{
// specify all portlet specific css property inside this
}
Thanks.


But I need this css file can be used in both normal webapps and as a portlet inside liferay portal, how to reference these css selector inside
.portletName{
// specify all portlet specific css property inside this
.selector1{
width:100px;
}
}