Reputation: 29
I'm trying to center nav-content using center option
However it doesn't work on the ul attribute.
Ends up looking like this instead.
My code:
...
<div class="nav-content center" style="background-color: black">
<ul class="tabs tabs-transparent">
<li class="tab"><a href="">Test 1</a></li>
<li class="tab"><a href="">Test 2</a></li>
</ul>
</div>
</nav>
Solution:
mdubus' answer is correct but it needs to be in the ul element instead of the div for it to work using Materialize.
Upvotes: 2
Views: 581
Reputation: 91
I'm not familliar with materielize, you can do it with css, by stting the parent element to: flex
and justifiy-content: center; or simply by setting .nav-content{ text-align: center; }
Upvotes: 0
Reputation: 130
On your div nav-content center
, just add a display:flex; justify-content:center;
. That should do the trick ;)
Upvotes: 2