Visualizzazione dei risultati da 1 a 3 su 3
  1. #1

    Child selector e table/tr

    Dato questo semplice HTML come esempio:
    codice:
    <table>
      <tr>
        <td>cella 1</td>
        <td>cella 2</td>
      </tr>
    </table>
    Perche' questo CSS funziona:
    codice:
    table tr {
      background-color: #0ff;
    }
    e questo no:
    codice:
    table>tr {
      background-color: #0ff;
    }
    :master: :master: :master:
    All work and no play makes EricFlat a dull boy

  2. #2
    Voglio dire, quei tag TR sono figli diretti di TABLE, perche' non funziona col child selector ">" ???

    Il bello e' che se invece uso:
    codice:
    tr>td {
      background-color: #0ff;
    }
    tutto funziona... ma perche' con TABLE e TR no???
    All work and no play makes EricFlat a dull boy

  3. #3
    Trovato

    The DOM shows a tbody element between table and tr, so even though it's not coded that way all the browsers insert it.

    http://www.pcreview.co.uk/forums/thread-2502416.php
    All work and no play makes EricFlat a dull boy

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2026 vBulletin Solutions, Inc. All rights reserved.