On 6/18/05, Brian Lowe <[EMAIL PROTECTED]> wrote:
>
> OK, here's an example I'm trying to get up using nested ULs and example
> suckerfish CSS menus.
>
> http://www.pals.nhs.uk/demo/check.htm
> http://www.pals.nhs.uk/demo/css/pals.css
> http://www.pals.nhs.uk/demo/css/pals-menu.css
>
> I *want* each top level menu item to be as small as possible but to hold its
> full text caption.
>
> If I set
> width: 2em;
> Then IE misbehaves and expands the block element to fit the content, but FF
> NS and Op *all* stick with 2em and my menu looks rubbish.
>
> Of course I could set a wider width for those and frig it for IE using
> width: 15em;
> width: expression(2 + 'em');
> But then FF NS and Op all use 15em and my menu still looks rubbish.
>
> If I use
> width: auto;
> then they all use 100% so I'm screwed again.
>
> So, how do I get the 'compliant' browsers to fail in the same way that IE
> does so effortlessly?
>
> Or...
>
> What is the 'correct' syntax to tell compliant browsers that I want the
> block to be as wide as the text (+padding) but no wider?
>
As you have already observed, IE processes "width" as it ought to
handle "min-width" (which it totally ignores.
so the following should do what you want::
foo {min-width:2em;} /* used by compliant browsers, ignored by ie*/
* html foo {width:2em;} /* hack - seen only by IE */
You will need to check behaviour on IE/Mac.
--
Richard Grevers
New Plymouth, New Zealand
Orphan Gmail invites free to good homes.
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/