andrisp Posted July 18, 2006 Report Share Posted July 18, 2006 Ir tabula ar šādiem css propertijiem: table#table { background-color: orange; } table#table thead td { background-color: black; color: white; } table#table tbody td { background-color: white; } Vai ir iespējams ar css panākt, ka visām pirmās rindas šūnām nav border apkārt ? Ja nav, tad varbūt varat ieteikt savādāku veidu kā ar css visām tbody td šūnām uzlikt borderu, bet thead td šūnām ne ? Eksperimentēju arī šādi: table#table { border-collapse: collapse; } table#table thead td { background-color: black; border: 1px solid black; } table#table tbody td { border: 1px solid orange; } Bet šim piemēram ir renderēšanas gļuki - IE un FF attēlo nedaudz atšķirīgi, kas it kā būtu sīkums, bet manā gadijumā tas neder. Paldies Link to comment Share on other sites More sharing options...
v3rb0 Posted July 18, 2006 Report Share Posted July 18, 2006 es headerī izmantoju nevis <td> bet <th> tagu. attiecīgi ar th tad ar css formē kā gribi. Link to comment Share on other sites More sharing options...
andrisp Posted July 18, 2006 Author Report Share Posted July 18, 2006 <th> no formatēšanas viedokļa ir praktiski tas pats kas <td> un manu problēmu neatrisina Link to comment Share on other sites More sharing options...
Delfins Posted July 18, 2006 Report Share Posted July 18, 2006 (edited) kā tad neatrisina? Imho tāpēc TH un TD pastāv... http://85.115.122.95/tests/table_borders.html Edited July 18, 2006 by Delfins Link to comment Share on other sites More sharing options...
andrisp Posted July 18, 2006 Author Report Share Posted July 18, 2006 Es gribēju panākt aptuveni kaut ko šādu: Link to comment Share on other sites More sharing options...
v3rb0 Posted July 18, 2006 Report Share Posted July 18, 2006 <style type="text/css"> table{border-collapse:collapse;} td {border:1px solid orange; height:10pt;} th {border:1px solid black; background-color:black; color:white} </style> <table> <tr> <th>Pirmā kolona</th> <th>Otrā kolona</th></tr> <tr><td /><td /></tr> <tr><td /><td /></tr> <tr><td /><td /></tr> <tr><td /><td /></tr> <tr><td /><td /></tr> <tr><td /><td /></tr> </table> Link to comment Share on other sites More sharing options...
andrisp Posted July 19, 2006 Author Report Share Posted July 19, 2006 Šo jau izmēģināju (skat. pirmo postu). Interesē, vai to nevar panākt bez border-collapse. Link to comment Share on other sites More sharing options...
Delfins Posted July 19, 2006 Report Share Posted July 19, 2006 nevar Link to comment Share on other sites More sharing options...
Recommended Posts