En CSS hay un selector para hacer referencia a un tipo de entrada específico que también tiene una clase?
Básicamente quiero un selector CSS que agarra toda la entrada[type="text"] pero que también tiene una clase "some-class".
Ambos de los siguientes no parecen estar funcionando para mí:
input[type="text"] .some-class {} /* doesn't work */
.some-class input[type="text"] {} /* doesn't work */
Estoy seguro de que me estoy perdiendo algo simple aquí. Gracias de antemano.
33
Author: Art Geigel, 2013-01-09
2 answers
Quieres input.some-class[type="text"]
.some-class input
busca etiquetas de entrada que sean descendientes de .some-class
.
input.some-class
hace lo contrario.
72
Author: wless1,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2016-11-04 11:13:28
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2016-11-04 11:13:28
input[type="text"].some-class {
....
}
Sin espacio entre " input [type="text"] "y".alguna clase " funcionará..
Input[type="text"]-el espacio intermedio es el problema-.some-class {}
10
Author: Hasteq,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2015-06-04 20:13:41
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2015-06-04 20:13:41