Zach Smith
Zach Smith

Reputation: 5674

Dropdown Nav bar having automatic width of contents

I have a wordpress site with a basic CSS dropdown menu, and seems the contents of the ul ul are rather large. I have put the ul ul at a static width, but I would love to have the width be as long as the title at all times. Seems width:auto isn't working. Hoping a guru can hold my hand.

http://bit.ly/fC7zT7

Under Our Products

Upvotes: 0

Views: 2224

Answers (1)

Diodeus - James MacFarlane
Diodeus - James MacFarlane

Reputation: 114367

When styling list menus, always style the A tag. Don't style the LI tag (other than float, when needed).

Also, add display:block you your menu A tags. You'll probably need to tweak your padding/margins a bit bit this will make them all the same width.

Upvotes: 2

Related Questions