Using custom.css file instead of Custom CSS section

More
1 year 8 months ago #67576 by pasti68
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

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

More
1 year 8 months ago #67590 by ced1870
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

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

More
1 year 8 months ago #67591 by pasti68
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

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

More
1 year 8 months ago #67593 by ced1870

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

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

More
1 year 8 months ago #67594 by pasti68
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!

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

More
1 year 8 months ago #67596 by ced1870

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

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

Time to create page: 0.213 seconds

Fast and powerful creation, customizable and responsive.

Read More

We have 743 guests and no members online