Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   HTML (http://www.velocityreviews.com/forums/f31-html.html)
-   -   suckerfish elastic width thing (http://www.velocityreviews.com/forums/t162831-suckerfish-elastic-width-thing.html)

the idiot 09-21-2005 10:15 AM

suckerfish elastic width thing
 
http://www.htmldog.com/articles/suck...downs/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



rf 09-21-2005 01:40 PM

Re: suckerfish elastic width thing
 
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.





W˙rm 09-21-2005 02:11 PM

Re: suckerfish elastic width thing
 

"the idiot" <sinatra@thesands.co.uk> kirjoitti
viestissä:7YScnfPp8pYor6zeSa8jmw@karoo.co.uk...

<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.



the idiot 09-22-2005 01:11 PM

Re: suckerfish elastic width thing
 

"the idiot" <sinatra@thesands.co.uk> wrote in message
news:7YScnfPp8pYor6zeSa8jmw@karoo.co.uk...
> http://www.htmldog.com/articles/suck...downs/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.




All times are GMT. The time now is 06:57 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.