PagodNaUtak
asked on
Simple referencing a class in css
I have a span like this:
<span class="chkbox deselected">
</span>
is the below code is how you reference the span in CSS?
span.chkbox.deselected{
float:left;
}
<span class="chkbox deselected">
</span>
is the below code is how you reference the span in CSS?
span.chkbox.deselected{
float:left;
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Although I believe there is no restriction as to use spaces in a className, in this situation I would avoid using spaces.
Hence leave the spaces out and call the class "checkboxSelected"
The CSS selector would then be
span.checkboxSelected
{
}
Hence leave the spaces out and call the class "checkboxSelected"
The CSS selector would then be
span.checkboxSelected
{
}
ASKER
I want to apply a css to a div having the class checkbox and deselected
did you tried my solution?
@qurvinder: Are you saying you want two class to one div/span?
Or do you want a class "selected' and a class "deselected"?
Or do you want a class "selected' and a class "deselected"?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Communications was too async. I agree with the comments Qurvinder made.
His CSS suggestions are OK!
His CSS suggestions are OK!
span.chkbox, span.deselected
{
}