@webstandardsgroup.org
Objet : Re: [WSG] css conventions
On Jan 25, 2007, at 5:33 PM, Michael Turnwall wrote:
I have a co-worker, that whenever he creates a class, puts div in front of it
if the class is being assigned to a div. Here's an example:
div.container {
background
I agree. Apply generic styles to a class, then add html tags as you go. This
avoids problems with specificity. The div.container class has a greater
specificity than the .container class, If both classes have the same
styles, the div.container class will override .container.
On 1/26/07,
As you can see, the code can get messy rather quickly. He says he does it to
avoid conflicts. My argument is that you should only do that when you
specifically want the class only to apply to a div. If I want to use the
class on another element I can't without creating a new rule. I would think
I have a co-worker, that whenever he creates a class, puts div in
front of it if the class is being assigned to a div. Here's an example:
div.container {
background-color: #fff;
margin-bottom: 18px;
}
div.container div.container_inner {
border: 1px solid #bbb;
On 1/25/07, Michael Turnwall [EMAIL PROTECTED] wrote:
I have a co-worker, that whenever he creates a class, puts div in front of
it if the class is being assigned to a div. Here's an example:
div.container {
background-color: #fff;
margin-bottom: 18px;
}
div.container div.container_inner {
On Jan 25, 2007, at 5:33 PM, Michael Turnwall wrote:
I have a co-worker, that whenever he creates a class, puts div in
front of it if the class is being assigned to a div. Here's an
example:
div.container {
background-color: #fff;
margin-bottom: 18px;
}
div.container