question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to increase width and height of the drop down in the nav bar?

See original GitHub issue

looks like heigh and width are predefined . And we are getting scrollbar if the width of the content in the dropdown is greater than the width of parent element in dropdown

example :

<ul id="dropdown1" class="dropdown-content">
<li><a href="#!">one two threee</a></li>
<li><a href="#!">two</a></li>
<li class="divider"></li>
<li><a href="#!">three</a></li>
</ul>
<nav>
  <div class="nav-wrapper">
    <a href="#!" class="brand-logo">Logo</a>
    <ul class="right hide-on-med-and-down">
      <li><a href="sass.html">Sass</a></li>
      <li><a href="components.html">Components</a></li>
      <!-- Dropdown Trigger -->
      <li><a class="dropdown-button" href="#!" data-activates="dropdown1">Dropdown<i class="mdi-navigation-arrow-drop-down right"></i></a></li>
    </ul>
  </div>
</nav>

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:7

github_iconTop GitHub Comments

16reactions
acburstcommented, Mar 2, 2015

You can have the width go past that of the button by defining data-constrainwidth="false"

There are more options that I’ve added to the documentation but they won’t be live until our next release.

10reactions
clusteratlascommented, Jul 6, 2017

2017: constrainWidth is now passed as an object option/property upon jquery initialization of the dropdown. Check http://materializecss.com/dropdown.html !

sample (with hover, lol):

$(".dropdown-button").dropdown({ hover: true, constrainWidth: false });
Read more comments on GitHub >

github_iconTop Results From Across the Web

Navbar dropdown width resize - Stack Overflow
To adjust the dropdown menu size to the same size as the containing list-item, declare a left and right property value of 0...
Read more >
How to design full width dropdown Navbar using Bootstrap
In Bootstrap 4, full width dropdown in Navbar might be possible by adding CSS properties either internally or externally based on conveniences.
Read more >
adjust dropdown position with increase in navbar height ...
I have increased the navbar height to 150px and centered the navbar li. but I want my dropdown list to open right below...
Read more >
How To Create a Dropdown Navigation Bar - W3Schools
Dropdown Menu inside a Navigation Bar. Hover over the "Dropdown" link to see the dropdown menu. Try it Yourself » ... Note the...
Read more >
How do I modify navbar height? - HTML & CSS - SitePoint
Also, I need to resize my logo, but I'm not sure of the best way to ... <ul class="dropdown-menu"> <li class="dropdown dropdown-submenu"> <a ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found