Using custom.css file instead of Custom CSS section

Using custom.css file instead of Custom CSS section was created by pasti68

Posted 1 year 1 month ago #67576
Hi

Now I have stumbled upon another problem. I'm trying to replace the main menu integrated in my template (Helix Ultimate) with a Maximenu CK. I managed to do that, only now, unfortunately, the entries in the main menu are also displayed as tiles. As I found out, this has to do with the fact that I made the following entries in custom.css file of my template to set the size of all tiles to fixed 215px x 215px:

li.maximenuck.level1 {
width: 215px !important;
height: 215px !important;
}

Apparently, this entry now affects EVERY maximenu CK I put on this page, and thus the main menu as well. As a solution I found out that I have to remove this entry in the custom.css file and then add it back in the Custom CSS section of the corresponding style I use for the tiles menu. The entry in Custom CSS then looks like this:

|ID| li.maximenuck.level1 {width: 215px ;
height: 215px ; }

This will then only affect the menu that uses this style. This solution works, but I don't like it. I don't like to use the Custom CSS function, but I want to make all changes to my website in the custom.css file. If ever something happens to the Maximenu CK module (whatever it might be), I don't want to lose all these settings. The custom.css file, on the other hand, I back up regularly.

So here's my question: Is it possible to write this entry in the custom.css file so that only the tile menu with the corresponding style is affected and not every Maximenu CK on the page? And if yes, how do I do it?

Kind regards and best thanks for your help

Paul
by pasti68

Please Log in or Create an account to join the conversation.

Replied by ced1870 on topic Using custom.css file instead of Custom CSS section

Posted 1 year 1 month ago #67590
the |ID| code has to be replaced with the ID of the html item
example with a module ID 123, the code would be
Code:
#maximenuck123 li.maximenuck.level1 { width: 215px !important; height: 215px !important; }

you an place that in the template css file if you want. The custom css area in the maximenu style is made to automatically replace the |ID| with the current module ID

Joomlack Webmaster and Developer

by ced1870

Please Log in or Create an account to join the conversation.

Replied by pasti68 on topic Using custom.css file instead of Custom CSS section

Posted 1 year 1 month ago #67591
Too bad that it is not possible to change a style in the custom.css file but only a module. Since I have used several modules for the Tile Menu (and more will be added in the future), this is not very practical for my purposes. I think that in this case I will stay with the megamenu of the template and try to customize it to my needs. But thanks anyway!
Kind regards
Paul
by pasti68

Please Log in or Create an account to join the conversation.

Replied by ced1870 on topic Using custom.css file instead of Custom CSS section

Posted 1 year 1 month ago #67593

Too bad that it is not possible to change a style in the custom.css file but only a module.

you can do it according to what I have said
using the module ID, it will target only this module ?May be that there is misunderstanding between us ? :)

Joomlack Webmaster and Developer

by ced1870

Please Log in or Create an account to join the conversation.

Replied by pasti68 on topic Using custom.css file instead of Custom CSS section

Posted 1 year 1 month ago #67594
This is exactly the problem, that only one specific module is changed by this, if I make the change according to your specifications in the custom.css file. But if I make the corresponding change in the Custom CSS section of a specific style, then ALL modules that use that style now and in the future are affected. That is, so I have to make the change only in one place, while I have to change the custom.css file after each addition of a new menu module in the future. Also, I just found out that my new Maximenu CK main menu also shows the images I assigned to various menu items. I want to show them in the tile menu but not in the main menu. I think this is getting too complex for me now and generates too much further work...
Thanks anyway for your help!
by pasti68

Please Log in or Create an account to join the conversation.

Replied by ced1870 on topic Using custom.css file instead of Custom CSS section

Posted 1 year 1 month ago #67596

Also, I just found out that my new Maximenu CK main menu also shows the images I assigned to various menu items. I want to show them in the tile menu but not in the main menu

if you use the same menu source, yes it will get the same data
you can edit the main menu >> advanced >> images management >> use images >> set it to NO

for the CSS for the tiles, you can also try to use a "module suffix" in the advanced options of the modules, and then setup your css rule with that class, example
Code:
.tilemenu li.maximenuck.level1 { width: 215px !important; height: 215px !important; }
add "tilemenu" in the module suffix option

Joomlack Webmaster and Developer

by ced1870

Please Log in or Create an account to join the conversation.

Time to create page: 1.384 seconds

Fast and powerful creation, customizable and responsive.

Read More

We have 933 guests and no members online