Update V8 to V9: Centered menu links

Update V8 to V9: Centered menu links was created by HeinzWi

Posted 3 years 7 months ago #57851
Hello CEd, hello Forum,

I have successfully updated a maximenu in Joomla 3.9.21 from V8 to V9.1.4.
The menu works pretty well overall, but I recognized a different orientation between V8 and V9 regarding the menu links.

BTW:
I have specified the width of all menu links (100px) by custom.css (hope this is not the problem ;)):
Code:
#maximenuck101 li.maximenuck.level1 { width: 100px; }

Under V8 all menu links were centered on my website -
now, under V9 they are aligned on the left and I'm not able to change.

I have checked the website's code and found that the "text-align" at "div#maximenuck101 ul.maximenuck li.maximenuck.level1" in the V8 installation affects the alignment of the menu links. If I switch to "text-align="left"" the menu links will be aligned to the left, by using "text-align="center"" the menu links are centered. That's makes sense to me :)

In the V9 migration I can see the same "text-align="center"", but it doesn't have any effect - the menu links are always left-aligned. That seems not to be okay to me :dry:

I would be very happy, if I could center the menu links also under V9.

Does anyone has any idea?

Thanks a lot for any help!

Kind regards
--
HeinzWi
Last Edit:3 years 7 months ago by HeinzWi
Attachments:
Last edit: 3 years 7 months ago by HeinzWi.

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

Replied by ced1870 on topic Update V8 to V9: Centered menu links

Posted 3 years 7 months ago #57852
Hi
you are right, this is due to some modification using the Flexbox
you can fix this with the code
Code:
#maximenuck101 li.maximenuck.level1 > * > span.titreck { justify-content: center; }

CEd

Joomlack Webmaster and Developer

by ced1870
The following user(s) said Thank You: HeinzWi

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

Replied by HeinzWi on topic Update V8 to V9: Centered menu links

Posted 3 years 7 months ago #57856
Hello CEd,

Thanks a lot for the quick and great support - everything works fine now :)

I think it would be great and much more comfortable for users, if it would be possible to enter the width and alignment of the menu links in the main menu right into MaxiMenuCK - maybe in one of the next updates?!

Kind regards
--
HeinzWi
Last Edit:3 years 6 months ago by HeinzWi
Last edit: 3 years 6 months ago by HeinzWi.

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

Replied by ced1870 on topic Update V8 to V9: Centered menu links

Posted 3 years 6 months ago #57905
for the alignment, I have noted this and I will fix it in a coming version
for the width, please detail what you want, because if you give a fixed width to an item, you may have some issues in the rendering

Joomlack Webmaster and Developer

by ced1870
The following user(s) said Thank You: HeinzWi

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

Replied by HeinzWi on topic Update V8 to V9: Centered menu links

Posted 3 years 6 months ago #57909
Hello CEd,

Thanks for your answer :)

I would be happy, if there could be a way to define a common width for all menu links in the main menu directly in the MaxiMenuCK interface.

I'm currently realize this setting via custom.css:
Code:
#maximenuck101 li.maximenuck.level1 { width: 100px; }

I'm not really sure, if this code have some issues in the rendering -
as far as I can see everything works pretty well ...

Kind regards
--
HeinzWi
Last Edit:3 years 6 months ago by HeinzWi
Last edit: 3 years 6 months ago by HeinzWi.

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

Replied by ced1870 on topic Update V8 to V9: Centered menu links

Posted 3 years 6 months ago #57917
your code is ok, the problem with a fixed width is about the responsiveness and how ir behave
you know what you are doing, but many users don't know that giving a fixed width is a bad idea, and they would give a width everywhere

Joomlack Webmaster and Developer

by ced1870
The following user(s) said Thank You: HeinzWi

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

Time to create page: 0.681 seconds

Fast and powerful creation, customizable and responsive.

Read More

We have 997 guests and no members online