Center the Off canvas toggle, without affecting the off-canvas area

Hi!

I have styled the Off canvas toggle to look like a button, and I need it centered.

I have added the class center-list, and it also affects the off canvas area which is not in place anymore.

Setting left and right margin to auto does nothing.

Centering the whole row also does nothing.

What should I do to get the Off canvas toggle centered, with the off-canvas area in place where it should be?

Thanks!

Hi There,

You have to target the anchor button only, please try with this custom CSS instead:

.x-anchor.x-anchor-toggle.center-list {
    left: 50%;
    margin-left: -19px;
}

Let us know how it goes!

Hi!

It worked with slight modification:

.x-anchor.x-anchor-toggle {
    margin-left:auto;
    margin-right:auto;
    display:block;
    max-width:250px;
}

Thanks!

You’re welcome.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.