2

we have created a simple Webcontent template with Liferay 6.2 EE.

The template was built with freemarker.

Now we want to use our own homemade css file to apply our style to the webcontent template.

But liferay's aui.css seems to override some of our css styles.

What's the best way to integrate our css file within freemarkers webcontent template ?

Is it possible to override aui.css ?

Thanks

HelmutSteiner
  • 99
  • 2
  • 11
  • 3
    Without a more specific knowledge of your actual DOM/CSS: "Just" be more specific than Liferay's selectors... – Olaf Kock Nov 18 '16 at 14:14
  • 1
    In order to override the styles in **`aui.css`**, there are at least two possible solutions: 1. [Create a Liferay Theme](https://dev.liferay.com/develop/tutorials/-/knowledge_base/6-2/developing-a-liferay-theme) which [contains the CSS file](https://dev.liferay.com/develop/tutorials/-/knowledge_base/6-2/styling-your-theme-with-css) you want to include with your web content. – stiemannkj1 Nov 18 '16 at 23:05
  • 2. Add CSS in a ` – stiemannkj1 Nov 18 '16 at 23:05
  • 1
    There is [a similar question on the Liferay Forums](https://web.liferay.com/community/forums/-/message_boards/message/14801284) which discusses these solutions in more depth. – stiemannkj1 Nov 18 '16 at 23:06
  • Where did you put your custom css and could you please give some examples. It seems pretty trivial to me, since aui.css is easy to override but more info is needed. – Michael Nov 20 '16 at 21:16
  • @Michael I put my custom css straight away in my template. But i only created a tag and placed my css inside this tag. – HelmutSteiner Nov 21 '16 at 12:17
  • @stiemannkj1 I'll go through the proposals made in the Liferay Forum. Thanks for the link. – HelmutSteiner Nov 21 '16 at 12:19
  • But in general my approch is to put my custom css inside my webcontent template with the – HelmutSteiner Nov 21 '16 at 12:20
  • You can use the !important for the Css or Change the loading order of the css – Navankur Chauhan Jan 09 '18 at 07:18

1 Answers1

2

Wrap your styles within aui class:

.aui {
//your styles goes here
}