Quantcast
Channel: Joomla! Forum - community, help and support
Viewing all articles
Browse latest Browse all 2109

Templates for Joomla! 4.x • Re: Problems styling main menu in Cassiopeia

$
0
0
Yes, the URL, sorry but I had not put the site on line because it is far from finished and I was hoping there was a simple syntax problem that would be evident in my post. I'll put the site on line.
Hi.

No one knows the code by heart, so always provide URL.

There is no syntax problems in your code. It’s just that your code does not have enough strong selectors in order to override the code coming from the template. With your approach, you should use !important to make the code stronger.
For example:

Code:

.my-main-menu {color : #663333 !important;}
But it is better to avoid using !important if possible.
Therefore, the correct way will be this: examine the desired element through the Dev Tools of your browser, find its CSS code, copy it in user.css and make changes.

For example, here is the main code of menu items.
1.jpg

Copy it, make changes and additions if necessary, and delete the properties that you do not change.
Will look like this

Code:

.container-header .mod-menu > li > a, .container-header .mod-menu > li > span {color: #663333;}

Statistics: Posted by Pavel-ww — Fri Mar 01, 2024 7:51 am



Viewing all articles
Browse latest Browse all 2109

Trending Articles