Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

auto-determine width based on number of nav items #91

Closed
jenlampton opened this issue Nov 5, 2013 · 5 comments
Closed

auto-determine width based on number of nav items #91

jenlampton opened this issue Nov 5, 2013 · 5 comments

Comments

@jenlampton
Copy link

It appears as though we are only allowed 5 navigation items, since the width is hard-coded to 20%.

It would be wonderful if there was a way to count the number of items in the menu, and determine the width automatically with javascript.

@mrjasonweaver
Copy link
Owner

Hi @jenlampton - I've added this in v 1.2.1 (44bb776). Thanks!

@mrjasonweaver
Copy link
Owner

@Helrunar
Copy link

Helrunar commented Nov 6, 2013

I think, it's a better solutions to set the width with CSS and not a calculated width as inline style. If we have i.e. short and long Menu-items we can work with padding and it will looks better.

@eduski
Copy link

eduski commented Nov 10, 2013

I agree with Helrunar, is it possible to not make each li an equal width within the menu? Thanks, this is a great menu.

@mrjasonweaver
Copy link
Owner

@jenlampton @Helrunar @eduski I've made an option for calculating menu items that defaults to false.

<script>
  $(".flexnav").flexNav({
    'calcItemWidths': true // dynamically calcs top level nav item widths
  });
</script>

https://github.com/indyplanets/flexnav/releases/tag/v1.2.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants