Ver Mensaje Individual
  #1 (permalink)  
Antiguo 08/12/2015, 17:42
kenproxd
 
Fecha de Ingreso: agosto-2009
Mensajes: 349
Antigüedad: 15 años, 1 mes
Puntos: 8
:first-child no funciona

Hola,

Estoy intentando quitar ciertos atributos con first-child (y last-child cuando se vea desde móviles) pero no logro hacerlo funcionar.

Código HTML:
Ver original
  1. <span class="precio">VENTA <strong>'.$moneda.$row['precioventa'].'</strong></span>
  2. <span class="precio">ALQUILER <strong>'.$moneda.$row['precioalquiler'].'</strong></span>

Código CSS:
Ver original
  1. .precio {
  2.   float: right;
  3.   font-size: 10px;
  4.   color: #868686;
  5.   text-align: right;
  6.   margin-right: 20px;
  7.   padding-right: 20px;
  8.   border-right: 1px solid #E0E0E0;
  9. }
  10. .precio strong {
  11.   font-size: 16px;
  12.   color: black;
  13.   display: block;
  14.   font-weight: 500;
  15. }
  16. .precio:first-child {
  17.   margin-right: 0px;
  18.   padding-right: 0px;
  19.   border-right: 0px;
  20. }

Espero que puedan ayudarme.

Última edición por kenproxd; 09/12/2015 a las 05:59