You are here: Re: to inline or not to inline « HTML « IT news, forums, messages
Re: to inline or not to inline

Posted by Andy Dingley on 04/20/07 13:30

On 20 Apr, 04:18, "Jon Slaughter" <Jon_Slaugh...@Hotmail.com> wrote:

> <div class="Box1">
> <span></span><span></span><span></span>
> <span></span><span></span><span></span>

Try this insted

<div class="Box1">
<span class="foo" ></span><span class="bar" ></span><span
class="bat" ></span>
<span class="woof" ></span><span class="bark" ></span><span
class="donkey" ></span>

..Box1 span.foo { ... }
..Box1 span.bar { ... }
..Box1 span.bat { ... }
..Box1 span.woof { ... }
..Box1 span.bark { ... }
..Box1 span.donkey { ... }


Nice simple selectors, no dependence on ordering, all selectors are of
equal specificity in the cascade (and so are unlikely to surprise
you).

Keep the outer "Box1" as a class, not an id. You can use both, but use
the class name as the CSS selector, not the id. This avoids some
trouble with high-specificity CSS selectors cascading above others.

 

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

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