I'm trying to achieve a horizontal CSS menu bar where all of the <a>
elements combined expand to the entire width of the parent. The HTML looks something like this:
<div id="parent">
<a href="/">Home</a>
<a href="/learn">Learn More About The Product</a>
<a href="/about">About Us</a>
<a href="/contact">Contact Us</a>
</div>
The idea is each of the four <a>
elements above take up some % of the total width so that the left side of Home
and the right side of Contact Us
line up with the edges of parent
. They can't take up exactly 25% each or else "Learn More About The Product" would look goofy because it is too long.
Any ideas?