Close

Centering pictures

supton
6 years ago
#14604 Quote
Avatar
  • 8
Hey guys,

How would I go about centering the items in a picture layout when there's fewer pictures than the number of boxes configured?

For example; if i have 6 boxes per row; but only 3 categories, can i get them center aligned; rather than all of them on the left hand side of the menu?
Valentin
6 years ago
#14607 Quote
Avatar
  • 172
jborghesani wrote:
Hey guys,

How would I go about centering the items in a picture layout when there's fewer pictures than the number of boxes configured?

For example; if i have 6 boxes per row; but only 3 categories, can i get them center aligned; rather than all of them on the left hand side of the menu?


Greetings,

such customization is a bit harder to achieve. You need to add the following code to your Custom Head Styles section:


@media all and (min-width: 1001px) {
     .mega-menu .fullWidth.categories .row {
          text-align: center;
          font-size: 0;
     }
     .mega-menu .fullWidth.categories .box {
          float: none;
          display: inline-block;
          vertical-align: top;
          font-size: 14px;
          text-align: left;
     }
}


Have in mind that this solution will only work for the Default clean theme, for any of the other themes you would probably need more customizations.
Best Regards,

Valentin Kirov
Nop-Templates.com
supton
6 years ago
#14608 Quote
Avatar
  • 8
Awesome stuff Valentin; it worked perfectly.

Thanks again!