druidos Posted February 23, 2006 Report Share Posted February 23, 2006 Dota tabula: <table> <thead> <tr> <th>P.</th> <th>NICK</th> <th>Login</th> <th>PASSWORD</th> <th>Price</th> <th>VAT</th> <th>Total</th> </tr> </thead> <tbody> <tr> <td>sk</td> <td>nickname</td> <td>login</td> <td>password</td> <td>price</td> <td>vat</td> <td>total</td> </tr> <tr> <td>sk</td> <td>nickname</td> <td>login</td> <td>password</td> <td>price</td> <td>vat</td> <td>total</td> </tr> </tbody> </table> Kā skaisti UN īsi ar CSS palīdzību pateikt, lai tabulas kolonnas saturs (ne virsraksts) tiktu izlīdzinātas: 1-2: pa kreiso malu 3-4: centrs 5-7: pa labi? Link to comment Share on other sites More sharing options...
druidos Posted February 23, 2006 Author Report Share Posted February 23, 2006 (edited) Kāpēc tas tā ir? Tiklīdz pajautā, tā uzreiz pats atrodi daļēju atbildi, bet pirms tam meklē meklē un neatrodi. :) Atbilde: tbody tr td + td + td { text-align:center } tbody tr td + td + td +td +td { text-align:right } Vismaz ar FF strādā. Uz IE nē. :( Edited February 23, 2006 by druidos Link to comment Share on other sites More sharing options...
druidos Posted February 24, 2006 Author Report Share Posted February 24, 2006 Kāds var ieteikt variantu, kas strādātu ar uz IE? Link to comment Share on other sites More sharing options...
bubu Posted February 24, 2006 Report Share Posted February 24, 2006 IE ļoti vāji atbalsta šādus css selektorus. Ja der javaskripta uzlabojumi, tad ņem šo: http://dean.edwards.name/IE7/ Ar tā palīdzību tev IE sapratīs tavis uzrakstītos css selektorus (un dažādus by default neatbalstītos atribūtus, piemēram kautvai min-height, position:fixed, u.c.). Viss, ko vajadzēs izdarīt, ir tikai iekļaut vienu vai vairākus js failiņus html lapā, un viss pārējais notiksies automātiski. Link to comment Share on other sites More sharing options...
GedroX Posted February 24, 2006 Report Share Posted February 24, 2006 (edited) Tīri ar CSS nekas neiznāks. Ja gribi ļoti automatizēti, nāksies vien likt klāt javascript. Skripts izskrien caur visu docu, atrod visas tabulas ar tavu klasi, sagrūž vajadzīgās klases tabulu šūnām. Cilvēki mīļie! Tagad nesāciet lamāt mani un stāstīt, cik tas ir stulbi! Diemžēl šajā forumā tā bieži notiek... Zinu, ka, jo mazāk js, jo labāk (visbiežāk), bet ja nu cilvēkam vajaga... Edited February 24, 2006 by GedroX Link to comment Share on other sites More sharing options...
Grey_Wolf Posted February 24, 2006 Report Share Posted February 24, 2006 vai tad taa tabula tik liela un mega automatizeeta ka jaizmano CSS ? ar rocinjaam salikt nevar? <td align="left"> <td align="center"> <td align="right"> ---------- P.S. neredzu sheit jeegu likt CSS... Link to comment Share on other sites More sharing options...
bubu Posted February 24, 2006 Report Share Posted February 24, 2006 Grey_Wolf: a ja nu pēķšņi visa piektā kolonna jāizlīdzina gar pretējo malu? cssā - viena rindiņa. htmlā - vājprāts. Link to comment Share on other sites More sharing options...
Grey_Wolf Posted February 24, 2006 Report Share Posted February 24, 2006 bubu --> nu var jau katraa kollonaa pielikt savu klasi :) (vai sajaa gadiijumaa 3 klases uz visu tabulu) tas buus 3 rindinjas CSS Link to comment Share on other sites More sharing options...
Klez Posted February 25, 2006 Report Share Posted February 25, 2006 <? $a = 'left'; $b = 'center'; $c = 'right'; ?> <td align="<?=$a?>"> <td align="<?=$b?>"> <td align="<?=$c?>"> Link to comment Share on other sites More sharing options...
bubu Posted February 25, 2006 Report Share Posted February 25, 2006 Klez: uz sadaļas nosaukumu paskaties. Link to comment Share on other sites More sharing options...
hmnc Posted February 26, 2006 Report Share Posted February 26, 2006 kas vainas clasēm c1,c2,c3,c*n ... ? un tad attiecīgi css: .c1,.c2 { text-align:left; } utt. Link to comment Share on other sites More sharing options...
Recommended Posts