AbanteCart Community

Shopping Cart Operations => Support => General Support => Topic started by: Mahomed Dawood on April 07, 2022, 02:03:33 AM

Title: CSS Rule for centering the categories in the menu
Post by: Mahomed Dawood on April 07, 2022, 02:03:33 AM
Hi AbanteCart

Does anyone know how to center the menu categories , I cannot seem to find the css rule for this

See attachment
Title: Re: CSS Rule for centering the categories in the menu
Post by: Basara on April 07, 2022, 03:32:08 AM
Hello.
Try this css
Code: [Select]
ul.categorymenu {
    text-align: center;
    display: inline-block !important;
}
Title: Re: CSS Rule for centering the categories in the menu
Post by: Mahomed Dawood on April 08, 2022, 02:41:50 AM
Hi

This just seems to make the menu container a little bigger , it does not center align the categories inside the menu container
Title: Re: CSS Rule for centering the categories in the menu
Post by: Basara on April 08, 2022, 03:16:12 AM
Hello.
Add one more
Code: [Select]
#categorymenu {
    text-align: center;
}
ul.categorymenu {
    display: inline-block !important;
}
Title: Re: CSS Rule for centering the categories in the menu
Post by: Mahomed Dawood on April 08, 2022, 05:46:10 AM
Hi

this works well for a few categories, but the minute i add more it goes back to left aligned , please see attached image

second image looks perfect but has less categories
Title: Re: CSS Rule for centering the categories in the menu
Post by: mejores on April 08, 2022, 07:29:57 AM
Hello,

They go to the left because there is not enough width on the right and that's why it creates two lines, try decreasing the spaces between menu and menu.

Greetings.