I am currently building a very simple drop down menu. There is one link that when rolled over I present 4 more options, vertical, blocked. My problem is that I do not want to set a fixed width. I want the pop out or drop down to be only as wide as the contents inside of it without breaking the line into 2 lines. Is this possible without setting a fixed width? The problem is that the contents of the drop down are dynamic and pulled from a database and I want them to appear on a single line in the drop down (no wrapping).
Say for example the link "View Customers" is on a web page. when I scroll over it I want the View customers to have background shading only as wide as the words "view customers". However the drop down that results from the mouse over is the name of 4 customers appearing on 4 separate lines. I want the shading around that to be as wide as the longest customer name:
1. Customer 2. This is a customer 3. Holy customer Batman! 4. This is a really long customer name.
Which in this example would be #4. "This is a really long customer name."
My code below is working but is not allowing me the amount of control that I need on the width. Can anyone make some suggestions?