You are here: Re: <span> « HTML « IT news, forums, messages
Re: <span>

Posted by richard on 11/01/06 18:46

"Jonathan N. Little" <lws4art@centralva.net> wrote in message
news:33791$4548affa$40cba7b4$8555@NAXS.COM...
> Toby Inkster wrote:
>> The Eclectic Electric wrote:
>>
>>> <p>There was a problem with your submission, problems are <span
>>> class="red">marked in red</span>. For your security, your password and
>>> security question answer fields have been reset.</p>
>>
>> I would have thought <strong class="very"> with the corresponding
>>
>> strong.very { color: #f22; font-weight: bold }
>>
>> would be more appropriate.
>>
>>> but the whole paragraph is shown in the default font.
>>
>> It is probably being over-ridden by a more specific part of the
>> stylesheet. Page URL?
>>
>
> Agree with Toby here 'red' is a very bad class name. Something like
> 'warning' or 'critcal' would be better that describe the purpose of the
> class not the styling because the styling may change in the future. What
> would happen if you needed to show a critically important message on your
> website and you had changed the styling so the background is red?
>

Using "reserved" words as class or ID names is just not a good practice.
Since a color name is another way of stating the hex or decimal value, the
interpretation of the use could result in things not wanted.
For instance, "backgound-color:red", "background-color:#F00", and
"background-color:RGB(255,0,0)" all say the same thing.
Whereas using "ared" would not be misinterpreted, but even "reda" might be.

I found this out years ago while learning to program in BASIC.
Saves a lot of confusion if you simply add a character to the beginning of
the reserved word. Not to the end.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация