Top "Css-selectors" questions

Selectors are patterns that match against elements in a document tree.

Select element based on multiple classes

I have a style rule I want to apply to a tag when it has two classes. Is there any …

css css-selectors
How do I apply a style to all children of an element

I have an element with class='myTestClass'. How do I apply a css style to all children of this elements? …

css css-selectors
What is this CSS selector? [class*="span"]

I saw this selector in Twitter Bootstrap: .show-grid [class*="span"] { background-color: #eee; text-align: center; border-radius: 3px; min-height: 30px; line-height: 30px; } …

css css-selectors
input[type='text'] CSS selector does not apply to default-type text inputs?

The default input type is 'text'. I have always assumed then that CSS declarations targeting input[type='text'] would affect …

css css-selectors
Jquery $(this) Child Selector

I'm using this: jQuery('.class1 a').click( function() { if ($(".class2").is(":hidden")) { $(".class2").slideDown("slow"); } else { $(".class2").slideUp(); } }); On …

jquery css-selectors children
Select every Nth element in CSS

Is it possible to select, say, every fourth element in a set of elements? Ex: I have 16 <div> …

css css-selectors
What is the difference between :focus and :active?

What is the difference between the :focus and :active pseudo-classes?

css css-selectors pseudo-class
Using :before and :after CSS selector to insert Html

I'm wondering if the following is possible. I know it doesnt work, but maybe I'm not writing it in the …

html css css-selectors
Apply style to only first level of td tags

Is there a way to apply a Class' style to only ONE level of td tags? <style>.MyClass …

css css-selectors
Pure CSS checkbox image replacement

I've got a checkbox list in a table. (one of a number of CB's on the row) <tr>&…

css checkbox css-selectors