Self-resizing navigation

The item width of this navigation gets calculated automatically, all you need to provide is the width of the surrounding container.

The container has a padding of 3px, so when inserting a width, consider the 6 additional pixels from the sides.

The absolute height of the menu is 36px (30px + 3px padding from top and bottom).

Click to change the width:

Back to Codrops