Reputation: 61
For reference:
I have a dropdown on the navbar of my webpage. Before adding the class
.sidenav-trigger
To the following :
<li><a href="" data-target="slide-out-settings" class="sidenav-trigger" style="color: black;"><i class="material-icons">settings</i>Settings</a></li>
Which is sat inside of the following <ul>
:
<ul id='dropdown1' class='dropdown-content'>
<li>
<a href="{% url 'FullSearch:Search' %}" style="color: black;"><i class="material-icons">search</i>Search</a>
</li>
<li>
<a href="{% url 'UserProfiles:UserProfile' Username=UserName %}" style="color: black;"><i class="material-icons">person</i>Profile</a>
</li>
<li>
<a href="{% url 'Discover:DiscoverPage' %}" style="color: black;"><i class="material-icons">public</i>Explore</a>
</li>
<li>
<a href="" data-target="slide-out-settings" class="sidenav-trigger" style="color: black;"><i class="material-icons">settings</i>Settings</a>
</li>
<li>
<a href="{% url 'UserLogout:LogoutPage' %}" style="color: black;"><i class="material-icons">arrow_back</i>Logout</a>
</li>
</ul>
The dropdown looks as intended.
Simply removing this class won't work as I need it in order to have a pullout sidebar.
How can I resolve the alignment of the text in the dropdown?
Upvotes: 2
Views: 51
Reputation: 914
Try setting the height to auto !important as following:
<li>
<a href="" data-target="slide-out-settings" class="sidenav-trigger" style="color: black; height: auto !important;">
<i class="material-icons">settings</i>
Settings
</a>
</li>
Upvotes: 1