The Lodge is members-only design/dev videos and Office Hours.

Next Office Hours Session: "Implementing an SVG Icon System" Nov 30 - 6:00 PM Eastern


  • # June 13, 2013 at 1:55 pm

    Hi all,

    can someone tell me when can i use .selected.
    can i use it with a ``? just with `

  • `?
# June 13, 2013 at 1:56 pm

Uh, you can give any element (including A) the class “selected”, yes. That what you mean?

# June 13, 2013 at 1:58 pm

i’m sorry it did not show as i intended it to show, my question is can i use it with a span tag, or a li tag ?

# June 13, 2013 at 2:00 pm

can i do something like this:
.swatch li.selected {
border:#000 1px solid !important;
-webkit-box-shadow:0px 1px 2px rgba(0,0,0,0.25);
-moz-box-shadow:0px 1px 2px rgba(0,0,0,0.25);
box-shadow:0px 1px 2px rgba(0,0,0,0.25);

# June 13, 2013 at 2:02 pm

Yes. Any element. A, span, li, body, div, etc. etc. etc.

# June 13, 2013 at 2:06 pm

does it work with multiple classes and elements, for instance: .swatch li span.selected doens’t work for me

# June 13, 2013 at 2:10 pm

Hi there is no restriction to use .selected as a class like you did.

# June 13, 2013 at 3:06 pm

@Bolivar00: show us where you’re having problems, or explain the issue in more detail, that’s when we can help you best.

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.

There's a whole bunch of content on CSS-Tricks.

Search for Stuff   •   Browse the Archives

Get the Newsletter ... or get the RSS feed