Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

109
Vistas
Overrideing hardcoded element style inside an iframe

I have no access to the html for this form, all theming has to be done via css that is loaded into the iframe which displays the form. Yes, this code is annoying and bad practice, but it is what it is.

<input 
    class="give-input required" 
    type="text" 
    name="give_first" 
    autocomplete="given-name" 
    placeholder="First Name" 
    id="give-first" 
    value="" 
    required="" 
    aria-required="true" 
    style="padding-left: 33px!important;" tabindex="1">

Versions of the below, beginning with #give-first and adding greater specificity, do not work

#give-first-name-wrap input#give-first.give-input.required[style] 
{ 
    padding-left:0; 
}

I don't have a hook to load jQuery into the iframe, very annoyingly!

All suggestions gratefully received.

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

style attributes have higher specificity than any selector.

They can only be overridden if they aren't !important and you use an !important rule.

In this case, the rule is !important so you can't override it.


You could replace it with JS. You don't need jQuery.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda