Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

108
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda