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

319
Vistas
How can I change the image inside a tag with css?

What I am trying to do is change the image and the "width" attribute of the image that is inside the "payment_method_micuentawebstd" label.

<label for="payment_method_micuentawebstd">
        Creditcard <img style="max-width: 85px; max-height: 30px;" src="https://yokiut.com/wp-content/plugins/woo-micuentaweb-payment//assets/images/micuentaweb.png" alt="Pago con tarjeta de débito / crédito">   </label>

I tried to do it like this, but I can't find the way:

#payment > ul > li.wc_payment_method.payment_method_micuentawebstd > label > img{
    max-width: 100% !important;;
/*content: url("https://yokiut.com/wp-content/uploads/2021/12/Tarjetas.png");*/
}

EDIT: I managed to change the width, but "content" doesn't change the image, it just puts it below the "src" of the html.

about 4 years ago · Santiago Gelvez
1 Respuestas
Responde la pregunta

0

Try this,

You are might not using the selector correctly. Need to see HTML but according to your CSS selector, I added HTML accordingly.

If your HTML is different add/update to the question.

#payment > ul > li.wc_payment_method.payment_method_micuentawebstd > label > img{
    max-width: 100%;
    /* random image url */
    content:url("https://media.istockphoto.com/photos/human-crowd-forming-a-chain-symbol-bonding-and-social-media-concept-picture-id936347578");
    
    /* 
    image url provided by you is commented to see change
    content:url("https://yokiut.com/wp-content/uploads/2021/12/Tarjetas.png"); */
}
<div id="payment">
    <ul>
      <li class="wc_payment_method payment_method_micuentawebstd">
        <label for="payment_method_micuentawebstd">
            Creditcard 
            <img style="max-width: 85px; max-height: 30px;" src="https://yokiut.com/wp-content/plugins/woo-micuentaweb-payment//assets/images/micuentaweb.png" alt="Pago con tarjeta de débito / crédito">  
         </label>
      </li>
    </ul>
</div>

about 4 years ago · Santiago Gelvez 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