Monirul Alom Al-Amin Monirul Alom Al-Amin - 1 year ago 158
jQuery Question

How can I center menu button for slicknav?

I want to center the menu menu button in slicknav. I tried but nothing works . I can align it to the left but not in center.

sample mark up is here

<ul id="menu">
<li><a href="#">item 1</a></li>
<li><a href="#">item 2</a></li>
<li><a href="#">item 3</a></li>
<li><a href="#">item 4</a></li>

and js

$(function() {

here is codepen link

Answer Source

I found solution to my question.

just added some css

.slicknav_menu {
  display: block;
  text-align: center;
  width: 100%;
.slicknav_btn {
  display: inline-block;
  float: none;
  text-align: center;

This solved my problem.

here is codepen link:

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download