I am currently working on styling a menu using a UL
. However, I encountered an issue where adding a border makes it extend across the whole screen due to the li
elements being set to display: block
. I do not want to specify a fixed width for these elements; instead, I prefer the width to adjust dynamically based on the text content.
Check out my JsFiddle example here: http://jsfiddle.net/5xu6t/