Re: [css-d] Multiple classes...

2012-08-25 Thread Michael Stevens

On 8/25/2012 7:47 PM, Tim Climis wrote:
On Saturday, August 25, 2012 3:03:33 pm Jay Tanna wrote:

#invitelist, (AND)
.window, (AND)
.redframe

Uh, no... Maybe some HTML would help.

#invitelist .window .redframe:

  
...
  


#invitelist .window.redframe:

  


--

I thought that first response was wrong but didn't wanna go off 
half-cocked and put my foot in my mouth...


I've got it working, I just wasn't sure why my original method didn't 
work and after studying your example I know why now. I forgot that the 
spaces denote SEPARATE blocks or DIVs. I was using your first example of 
CSS with your second example of HTML (two classes on the div) and 
because of the spaces the browser was looking for another DIV instead of 
a DIV with two classes.


Thanks for clarifying!

Mike
__
css-discuss [css-d@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


Re: [css-d] Multiple classes...

2012-08-25 Thread Tim Climis
On Saturday, August 25, 2012 3:03:33 pm Jay Tanna wrote:
> #invitelist, (AND)
> .window, (AND)
> .redframe

Uh, no...

Maybe some HTML would help.

"#invitelist .window .redframe" applies to the inner most div in the code 
below.


  
...
  


"#invitelist, .window, .redframe" applies to all three of the divs below:





"#invitelist .window.redframe" applies to the inner most div in the code below 
(note how the div has two classes):


  


So, Michael, yes, you're still remembering correctly.  Maybe if we knew what 
your HTML looked like, we'd have better luck helping you get the correct 
selector.

---Tim

__
css-discuss [css-d@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


Re: [css-d] Multiple classes...

2012-08-25 Thread Jay Tanna

#invitelist, (AND)
.window, (AND)
.redframe



> That makes each entry separate, no?
> 
> #invitelist, (OR)
> .window, (OR)
> .redframe
> 
> I was intentionally making it as specific as I could so it
> would only apply to that one specific element.
> 
> Mike
> 

__
css-discuss [css-d@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


Re: [css-d] Multiple classes...

2012-08-25 Thread Michael Stevens

That makes each entry separate, no?

#invitelist, (OR)
.window, (OR)
.redframe

I was intentionally making it as specific as I could so it would only 
apply to that one specific element.


Mike

On 8/25/2012 2:22 PM, Jay Tanna wrote:

You also need a comma after each Id and/or clas like this:

#invitelist, div.window {
display: block;
width: 98%;
height: 100px;
overflow: auto;
padding: 5px;
background-color: #ff;
color: #00;
}

#invitelist, .window, .redframe {
border: 3px ridge #b90025;
}


__
css-discuss [css-d@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


Re: [css-d] Multiple classes...

2012-08-25 Thread Jay Tanna
You also need a comma after each Id and/or clas like this:

#invitelist, div.window {
display: block;
width: 98%;
height: 100px;
overflow: auto;
padding: 5px;
background-color: #ff;
color: #00;
}

#invitelist, .window, .redframe {
border: 3px ridge #b90025;
}



> I've been out of it for a while so
> this is likely a rookie question that I've forgotten the
> answer to. I'm working on a section that makes a DIV of a
> certain size with scrolling contents. I wanted to make
> different DIVs with the difference being their border color.
> And instead of writing a larger section of CSS three times I
> did it like so:
> 
> #invitelist div.window {
>     display: block;
>     width: 98%;
>     height: 100px;
>     overflow: auto;
>     padding: 5px;
>     background-color: #ff;
>     color: #00;
> }
> 
> #invitelist div.window.redframe {
>     border: 3px ridge #b90025;
> }
> 

__
css-discuss [css-d@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


[css-d] Multiple classes...

2012-08-25 Thread Michael Stevens
I've been out of it for a while so this is likely a rookie question that 
I've forgotten the answer to. I'm working on a section that makes a DIV 
of a certain size with scrolling contents. I wanted to make different 
DIVs with the difference being their border color. And instead of 
writing a larger section of CSS three times I did it like so:


#invitelist div.window {
display: block;
width: 98%;
height: 100px;
overflow: auto;
padding: 5px;
background-color: #ff;
color: #00;
}

#invitelist div.window.redframe {
border: 3px ridge #b90025;
}

Originally, I tried:

#invitelist div .window
and
#invitelist div .window .redframe

But could only get it to work by taking out all the spaces so I would up 
with:


#invitelist div.window.redframe

I don't get why this didn't work with the spaces. My understanding was 
that with the spaces it targets anything with a class of redframe inside 
anything with a class of window inside a DIV inside a DIV with an ID of 
invitelist. What I would up with works but seems to me that it will only 
target a DIV that has the class window and redframe. The distinction is 
subtle.


Refresh my memory, please...

Thanks,

Mike
__
css-discuss [css-d@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/