are shrink-to-fit table cells possible?

Posted by Nano8Blazex on Stack Overflow See other posts from Stack Overflow or by Nano8Blazex
Published on 2011-01-03T07:05:20Z Indexed on 2011/01/03 9:54 UTC
Read the original article Hit count: 155

Filed under:
|

Let's say I have a menu of a prespecified width...

I want each menu item to shrink-to-fit with its contents, with the exception of ONE, which then fills up the remaining space in the menu.

so like:


                                                       Fill | item | item | item

So far the closest I've come to achieving this effect is by using display:table-cell; in the css code for each menu item. But the problem is unless I define a width for the "item"s, they all expand to take up the same amount of width in the table.


      Fill      |      item      |      item      |      item      |      item

Is there any way to have the item spaces shrink to fit the item and have the fill just fill up the rest of the div?

I might not have asked this very clearly... I'll clarify if needed.

© Stack Overflow or respective owner

Related posts about css

Related posts about table