cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

Quick-add: + add another resource

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

Quick-add: + add another resource

Code Indentation

     

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

            
              <table>
  <tr>
    <td></td>
    <td>EQUIPOS</td>
    <td>PJ</td>
    <td>PG</td>
    <td>PE</td>
    <td>PP</td>
    <td>GF</td>
    <td>GC</td>
    <td>DG</td>
    <td>PTS</td>
  </tr>
  <tr>
    <td>1</td>
    <td>Alianza Lima</td>
    <td>11</td>
    <td>8</td>
    <td>3</td>
    <td>0</td>
    <td>20</td>
    <td>5</td>
    <td>15</td>
    <td>27</td>
  </tr>
  <tr>
    <td>2</td>
    <td>Sporting Cristal</td>
    <td>11</td>
    <td>8</td>
    <td>2</td>
    <td>1</td>
    <td>27</td>
    <td>13</td>
    <td>14</td>
    <td>26</td>
  </tr>
  <tr>
    <td>3</td>
    <td>Melgar</td>
    <td>12</td>
    <td>7</td>
    <td>3</td>
    <td>2</td>
    <td>16</td>
    <td>9</td>
    <td>7</td>
    <td>24</td>
  </tr>
  <tr>
    <td>4</td>
    <td>Unión Comercio</td>
    <td>12</td>
    <td>6</td>
    <td>1</td>
    <td>5</td>
    <td>17</td>
    <td>13</td>
    <td>4</td>
    <td>19</td>
  </tr>
  <tr>
    <td>5</td>
    <td>Universitario</td>
    <td>12</td>
    <td>5</td>
    <td>3</td>
    <td>4</td>
    <td>13</td>
    <td>12</td>
    <td>1</td>
    <td>18</td>
  </tr>
  <tr>
    <td>6</td>
    <td>Sport Huancayo</td>
    <td>12</td>
    <td>5</td>
    <td>3</td>
    <td>4</td>
    <td>10</td>
    <td>12</td>
    <td>-2</td>
    <td>18</td>
  </tr>
  <tr>
    <td>7</td>
    <td>Cienciano</td>
    <td>12</td>
    <td>5</td>
    <td>2</td>
    <td>5</td>
    <td>16</td>
    <td>18</td>
    <td>-2</td>
    <td>17</td>
  </tr>
  <tr>
    <td>8</td>
    <td>Los Caimanes</td>
    <td>12</td>
    <td>4</td>
    <td>3</td>
    <td>5</td>
    <td>13</td>
    <td>17</td>
    <td>-4</td>
    <td>15</td>
  </tr>
  <tr>
    <td>9</td>
    <td>Real Garcilaso</td>
    <td>12</td>
    <td>3</td>
    <td>5</td>
    <td>4</td>
    <td>15</td>
    <td>14</td>
    <td>1</td>
    <td>14</td>
  </tr>
  <tr>
    <td>10</td>
    <td>León de Huánuco</td>
    <td>11</td>
    <td>4</td>
    <td>2</td>
    <td>5</td>
    <td>15</td>
    <td>16</td>
    <td>-1</td>
    <td>14</td>
  </tr>
  <tr>
    <td></td>
    <td>EQUIPOS</td>
    <td>PJ</td>
    <td>PG</td>
    <td>PE</td>
    <td>PP</td>
    <td>GF</td>
    <td>GC</td>
    <td>DG</td>
    <td>PTS</td>
  </tr>
</table>
<script src="https://code.jquery.com/jquery-1.10.2.js"></script>
            
          
!
            
              table {
  border-collapse: separate;
  border-spacing: 5px;
  font-family: 'Segoe UI', Arial;
  margin: 10px auto;
}

td {
  padding: 5px;
  text-align: right;
}

/* Filas pares */
tr:nth-child(even) {
  background: LightCyan;
}

/* Filas impares */
tr:nth-child(2n-1) {
  background: Moccasin;
}

/* primera y ultima fila */
tr:nth-child(1),
tr:nth-last-child(1) {
  background: gray;
  color: white;
  font-weight: bold;
  text-align: center;
}

/* Primera columna */
td:first-child {
  text-align: left;
}

/* Segunda columna */
td:nth-child(2) {
  font-weight: bold;
  text-align: left;
}

/* Ultima columna */
td:last-child {
  font-weight: bold;
}

/* Celdas vacias  */
td:empty {
  background: white;
}

/* 2ª fila, última columna */
tr:nth-child(2) td:last-child {    
  background: LightSalmon ;
}
            
          
!
            
              // celdas negativas
$("td:contains('-')").css("color", "red");
            
          
!
999px
Loading ..................

Console