Question

I want to customize the navigation bar in my theme. I searched for the CSS file that styles the navigation bar in the css directory but I couldn't find it.

In the nagivation.vm file, the navigation is declared as follows:

<nav class="$nav_css_class" id="navigation">

and using firebug I found out that the class is

sort-pages modify-pages.

I appreciate your help.

Thanks

Was it helpful?

Solution

The css file is called css/navigation.css. However, best practice is to do all modifications in _diffs/css/custom.css - this file is loaded last and all settings in there will override those in navigation.css and any other files. As a side effect, you'll have all of your settings neatly separated from Liferay's and are in a better position during updates.

custom.css is supposed to be empty in all themes that are meant for extension. If you start with the classic theme, you'll see that custom.css in there is not empty - this means, that the classic theme is not meant to be extended. Technically you can still do so of course, but Liferay might change this theme without notice in future versions and you'll end up upgrading then.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top