Visualizzazione dei risultati da 1 a 3 su 3
  1. #1
    Utente di HTML.it
    Registrato dal
    Apr 2004
    Messaggi
    513

    dubbio formattazione tabella!

    È sicuramente una domanda stupida...ma ho un dubbio su quale sia il modo per formattar questa tabella validando il tutto in xhtml strict

    codice:
    <table id="xxx">
                                            <thead>
                                                   <tr>
                                                       <th></th>
                                                       <th></th>
                                                       <th></th>
                                                   </tr>
                                            </thead>
                                            <tbody>
                                                   <tr>
                                                       <td></td>
                                                       <td></td>
                                                       <td></td>
                                                   </tr>
                                                   <tr>
                                                       <td></td>
                                                       <td></td>
                                                       <td></td>
                                                   </tr>
                                            </tbody>
                                     </table>
    Praticamente, vorrei dar alla prima colonna una larghezza pari al 50%, alla seconda pari al 40% e alla terza del 10%...quale è secondo voi la soluzione più "logica"?

  2. #2
    prova cosi':
    codice:
    <style type="text/css">
    <!--
    #xxx {
    	width: 100%;
    }#xxx .td1 {
    	width: 50%;
    	background-color:#00CCFF;
    }
    #xxx .td2 {
    	width: 40%;
    	background-color:#FFFF99;
    }
    #xxx .td3 {
    	width: 10%;
    	background-color:#CCCCFF;
    }
    -->
    </style>
    </head>
    
    <body>
    
    <table id="xxx">
    		<thead>
    			   <tr>
    				   <th class="td1">1</th>
    				   <th class="td2">2</th>
    				   <th class="td3">3</th>
    			   </tr>
    		</thead>
    ...
    ciak

  3. #3
    Utente di HTML.it
    Registrato dal
    Apr 2004
    Messaggi
    513
    Quindi mi suggerisci di utilizzar 3 classi...ok!

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 © 2025 vBulletin Solutions, Inc. All rights reserved.