Selector CSS para input type = " submit"


¿Hay un selector CSS para disabled input type="submit" o "button"?

¿Debo usar simplemente input[type="submit"][disabled]?

¿Funciona eso en IE6?

Author: senshin, 2010-09-21

3 answers

¿Funciona eso en IE6?

No, IE6 no soporta selectores de atributos en absoluto, cf. Compatibilidad con CSS e Internet Explorer.

Usted puede encontrar Cómo solucionarlo: IE6 no admite selectores de "atributos" CSS vale la pena leerlo.


EDITAR
Si se a ignorar IE6, usted podría hacer (CSS2.1):

input[type=submit][disabled=disabled],
button[disabled=disabled] {
    ...
}

CSS3 (IE9+):

input[type=submit]:disabled,
button:disabled {
    ...
}

Usted puede sustituya [disabled=disabled] (valor del atributo) por [disabled] (presencia del atributo).

 101
Author: jensgram,
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
2017-05-23 11:54:00

Como dijo jensgram, IE6 no soporta selector de atributos. Podría agregar un class = "disabled" para seleccionar las entradas disabled para que esto pueda funcionar en IE6.

 1
Author: Tim,
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
2010-09-21 11:13:21

Usé la solución @jensgram para ocultar un div que contiene una entrada deshabilitada. Así que escondo todo el padre de la entrada.

Aquí está el código :

div:has(>input[disabled=disabled]) {
    display: none;
}

Tal vez podría ayudar a algunos de ustedes.

 0
Author: Meloman,
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
2018-03-28 15:16:34