Is it possible to set the min-width of a submenu in CSS to be equal to that of the corresponding link in a navigation menu? I am using LESS for my styling.
<ul>
<li>
<a href="">Item FooBarBaz</a>
<ul class="submenu">
<li><a>sub1</a></li>
<li><a>sub2</a></li>
<li><a>sub3</a></li>
</ul>
</li>
<li>
<a href="">Item FooBarBazZipBamBop</a>
<ul class="submenu">
<li><a>sub1</a></li>
<li><a>sub2</a></li>
<li><a>sub3</a></li>
</ul>
</li>
</ul>
My goal is to have each ul.submenu
match the min-width of its preceding anchor element. Since this width could vary for each submenu, is CSS capable of achieving this or would javascript be a more suitable solution?