suckerfish elastic width thing

Discussion in 'HTML' started by the idiot, Sep 21, 2005.

  1. the idiot

    the idiot Guest

    http://www.htmldog.com/articles/suckerfish/dropdowns/example/

    anyway i was looking at this because the elasticity bit interests me
    and i was looking at the css which is where i get a bit confused..

    for instance.....

    #nav a {
    display: block;
    width: 10em;
    w\idth: 6em;
    color: #7C6240;
    text-decoration: none;
    padding: 0.25em 2em;
    }

    what does the w\idth bit do - is it a hack or something?
    pardon my ignorance but i am still trying to learn as fast as i can
    mainly through reverse engineering

    thanks in advance
     
    the idiot, Sep 21, 2005
    #1
    1. Advertising

  2. the idiot

    rf Guest

    the idiot wrote:

    > #nav a {
    > display: block;
    > width: 10em;
    > w\idth: 6em;
    > color: #7C6240;
    > text-decoration: none;
    > padding: 0.25em 2em;
    > }
    >
    > what does the w\idth bit do - is it a hack or something?
    > pardon my ignorance but i am still trying to learn as fast as i can
    > mainly through reverse engineering


    It's a way of "commenting" out something that you don't want without going
    to the trouble if using the /* */ comment construct? If so, it's a bad way.
    w\idth is not a valid property so gets ignored, well it *should* get
    ignored.[1]

    However that said I often use a z to cheap and nastily "deactivate"
    properties or attributes. For example
    <div zclass="whatever">
    temporarily disables the class attribute for that div with a single
    keystroke.

    I only do this where I know it *will* be ignored, that is in the couple of
    browsers I use for alpha testing.

    Never leave such artifacts in a production or even a beta page. You don't
    know what the users/clients browser will do with it.

    [1] At least on browser, obsolete Netscape 4.7, will ignore the entire CSS
    rule if one single property is invalid. We are relying on the browsers error
    correction here.

    Cheers
    Richard.
     
    rf, Sep 21, 2005
    #2
    1. Advertising

  3. the idiot

    Wÿrm Guest

    "the idiot" <> kirjoitti
    viestissä:...

    <snip>

    > #nav a {
    > display: block;
    > width: 10em;
    > w\idth: 6em;
    > color: #7C6240;
    > text-decoration: none;
    > padding: 0.25em 2em;
    > }
    >
    > what does the w\idth bit do - is it a hack or something?


    If I recall right, in this case it "hides" width: 6em; from MS IE 5.5 and
    5.0. For IE 5.0 and 5.5 width:10em; is last thing they see, for IE 6em; is
    what IE 6.0 sees. Usually this is one way to get things work on IE 5.0 and
    5.5 for some of their broken box model bug that were fixed for IE 6.0.
     
    Wÿrm, Sep 21, 2005
    #3
  4. the idiot

    the idiot Guest

    "the idiot" <> wrote in message
    news:...
    > http://www.htmldog.com/articles/suckerfish/dropdowns/example/
    >
    > anyway i was looking at this because the elasticity bit interests me
    > and i was looking at the css which is where i get a bit confused..
    >
    > for instance.....
    >
    > #nav a {
    > display: block;
    > width: 10em;
    > w\idth: 6em;
    > color: #7C6240;
    > text-decoration: none;
    > padding: 0.25em 2em;
    > }
    >
    > what does the w\idth bit do - is it a hack or something?
    > pardon my ignorance but i am still trying to learn as fast as i can
    > mainly through reverse engineering
    >
    > thanks in advance
    >

    thanks for the replies.
     
    the idiot, Sep 22, 2005
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. AndrewF
    Replies:
    1
    Views:
    785
    Bruce Barker
    Oct 10, 2005
  2. Neo Geshel
    Replies:
    81
    Views:
    2,902
    diecleartype
    Jul 10, 2006
  3. Victoria Clare
    Replies:
    1
    Views:
    1,728
    Peter Mount
    Aug 16, 2004
  4. Neo Geshel
    Replies:
    6
    Views:
    496
    Neo Geshel
    Oct 24, 2004
  5. Zam
    Replies:
    1
    Views:
    242
    Mark Schupp
    Mar 14, 2005
Loading...

Share This Page