To explain the problem: let's say you have five menu items. You want
each to take up as much space as they need, but no more. (So you
don't just want five items each with a 20% width; one could be 10%,
one could be 18%, and so on.) But no matter, you always want the left-
most item to be at the far left, and the right-most item to be at the
far left, and everything else centred in between. Justified menus.
See the attached file for the CSS to do it. It works in Safari and
Firefox, and of course fails miserably in IE6. Drew, I think you had
an idea for getting it working in IE, but I can't remember what it
was. Care to enlighten us?
If anyone else has an idea on how to get it working in IE, please
email the list. Bonus points for not using Javascript. And it's
cheating to manually set the widths, because we wanted the CSS to work
when menus are added and removed.
M.
Something after the list.
--
Matt Riggott (mailto:matt.r...@gmail.com).
Dictated but not read.
I don't know if Google Groups or your mail app stripped it, but you
can see it in the thread on the web:
<http://groups.google.com/group/refresh-edinburgh/t/833e150f9b8951b0>
M.
Last Wednesday, while sipping on this month's Refreshing pints, Andy
Durdin, Drew Neil, Rory Fitzpatrick, and I had a little discussion
about one of those perennially-frustrating things to do in CSS:
justified menus. And we came dangerously close to solving it.
To explain the problem: let's say you have five menu items. You want
each to take up as much space as they need, but no more. (So you
don't just want five items each with a 20% width; one could be 10%,
one could be 18%, and so on.) But no matter, you always want the left-
most item to be at the far left, and the right-most item to be at the
far left, and everything else centred in between. Justified menus.
See the attached file for the CSS to do it. It works in Safari and
Firefox, and of course fails miserably in IE6. Drew, I think you had
an idea for getting it working in IE, but I can't remember what it
was. Care to enlighten us?