Bill.Caffery
Bill.Caffery

Reputation: 464

dynamically adjust size of html li based on child width

I'm using this tutorial: http://net.tutsplus.com/tutorials/html-css-techniques/how-to-create-a-drop-down-nav-menu-with-html5-css3-and-jquery/

This is my site: http://billcaffery.dnsd.me

I'm trying to get the 'Projects' tab to be large enough to not disappear before the text finishes printing out. Is there some way to add a css rule to make this happen with out hard coding widths and such?

All code at https://github.com/billythakidd04/grown-kidd-site

Upvotes: 0

Views: 449

Answers (1)

ultranaut
ultranaut

Reputation: 2140

You need to change the width in your styles for nav ul ul from 100% to auto. The 100% is constraining it to the width of its parent container, which is the width of the nav bar item, setting it to auto will allow it to expand to contain the content.

Upvotes: 1

Related Questions