Sandis Posted December 9, 2004 Author Report Posted December 9, 2004 (edited) Nu taa ... Man liidz shim lapaa ir taa, ka while() ciklaa no DB lapaa izsviezh atteelus <tr><td>(bilde)</td></tr> tagos, kas bilzhu iecentreeshanu jeb izliidzinaashanu, piemeeram, peedeejaa rindaa, kuraa bija nevis pieci, bet, piem, 2 atteeli, padariija neiespeejamu! Vai var nojaust!? Lapaa tas izskataa taa - * - bilde; Patreiz ir taa - ***** ** Vajag shaadi - ***** ..* * Edited December 9, 2004 by Sandis
Venom Posted December 9, 2004 Report Posted December 9, 2004 un kas tad, vella pēc nav tā kā vajag iekš <style type="text/css">.lapa {width:500px} .lapa div {width:100px;height:100px;display:inline;border:1px solid black;} .lapa div img {max-width:100px;max-height:100px;border:0;padding:0;margin:0;} </style> <div class="lapa" align="center"> --- šeit vienkārši tiek bliezti thumbnāļi no db -- <div><a href="#"><img /></a></div> <div><a href="#"><img /></a></div> <div><a href="#"><img /></a></div> <div><a href="#"><img /></a></div> <div><a href="#"><img /></a></div> <div><a href="#"><img /></a></div> <div><a href="#"><img /></a></div> -- un šeit izvads no DB beidzas --- </div> piemēra?
Sandis Posted December 9, 2004 Author Report Posted December 9, 2004 Ne vella, Venom, Tava variantaa visas bildiites smuki sakaarto vertikaalaa rindinjaa vienu zem otras! :(
Roze Posted December 9, 2004 Report Posted December 9, 2004 Nu liec <tr><td align="center"><img ..><img ..><img ..><img ..><img ..><img ..></td></tr> <tr><td align="center"><img ..><img ..></td></tr>
Sandis Posted December 9, 2004 Author Report Posted December 9, 2004 Taa arii esmu dariijis, bet kaa man ar sho risinaajumu sakaartot, iecentreet rindu, ja tajaa ir, piemeeram, 2 atteeli - ejot cauri while() ciklam, tas vienkaarshi iesviezh lapaa 2 attelus kreisajaa malaa un nesmuki izskataas,!
Sandis Posted December 9, 2004 Author Report Posted December 9, 2004 Paga, sapratu Tavu domu, Roze, tuliit meegjinaashu savu kodu pielabot peec Tava koda lidziibas, un .. tad jau redzees...
bubu Posted December 9, 2004 Report Posted December 9, 2004 Ne vella, Venom, Tava variantaa visas bildiites smuki sakaarto vertikaalaa rindinjaa vienu zem otras! :( Nu nez, man gan Venoma risinājums strādā tieši tā kā tev vajag (tb pirmās 5 bildes ir vienā rindā, un otrā rindā ir divas bildes iecentrētas vidū.
Sandis Posted December 9, 2004 Author Report Posted December 9, 2004 Man to visu padariishanu vajadzeetu paarveest ciklaa! Suggestions!?
Sandis Posted December 9, 2004 Author Report Posted December 9, 2004 Tieshaam, bubu!? Man izskataas taa: *-bilde; * * * * * * * Un nekaa labaak! Baac!
Sandis Posted December 9, 2004 Author Report Posted December 9, 2004 (edited) Man kods izskataas shaadi: $buf .= '<div class="lapa" align="center">'; for($x = 0; $x < $hmr; $x++){ $y = $x; $im = '<a href="./index.php?id=2&g='.$_REQUEST["g"].'π='.($z+($y*5)).'"><img src=".'.$GLOBALS["imglib"].'/'.$gal[$_REQUEST["g"]-1][1].'/'.$gal[$_REQUEST["g"]-1][3][$z+($y*5)].'" border="0"></a>'; $buf .= '<div>'; //sheit mazaas bildiites izsviezh $buf .= '<td width="600" height="222" align="center" valign="middle">'.$im; $buf .= '</div>'; } $buf .= '</div>'; ... un nesakaarto! :blink: Edited December 9, 2004 by Sandis
Venom Posted December 9, 2004 Report Posted December 9, 2004 td iekš div, prātiņ~ tad kā tu tomēr gribi - viss iecentrēts, bet maksimāli 5 bildes rindā? <div align="center"> un te cikls, kas pēc katram 4 <img /> liek <br>, vai arī liek <div><img />x5</div> </div> es saku - uzzīmē ;)
Sandis Posted December 9, 2004 Author Report Posted December 9, 2004 Man vienkaarshi jaalabo viena guru uzrakstiits kods, kas nestraadaa! :( Tagad es saprotu, ka Venom variants aizietu, bet kaa man vinju iepiit tanii mistiskajaa guru kodaa!? :(
Sandis Posted December 9, 2004 Author Report Posted December 9, 2004 To visu var apskatities sheit : http://paste.php.lv/1449
Venom Posted December 9, 2004 Report Posted December 9, 2004 ja saprotu -$hmr ir "how many results", t.i. $x ir tas, kura bilde iet pēc kārtas, tad $im = '<a href="./index.php?id=2&g='.$_REQUEST["g"].'π='.($z+($y*5)).'"><img src=".'.$GLOBALS["imglib"].'/'.$gal[$_REQUEST["g"]-1][1].'/'.$gal[$_REQUEST["g"]-1][3][$z+($y*5)].'" border="0"></a>'.($x%5==0?'<br />':''); NB: a varbūt tu grībēji tā? <style type="text/css">.lapa img {vertical-align:middle;border:1px solid black} </style> <div class="lapa" align="center"> <img src="http://www.google.lv/images/hp0.gif" height="10" width="100" /> <img src="http://www.google.lv/images/hp0.gif" height="100" width="100" /> <img src="http://www.google.lv/images/hp0.gif" height="20" width="60" /> <img src="http://www.google.lv/images/hp0.gif" height="10" width="60" /> <img src="http://www.google.lv/images/hp0.gif" height="140" width="100" /><br /> <img src="http://www.google.lv/images/hp0.gif" height="100" width="100" /> <img src="http://www.google.lv/images/hp0.gif" height="10" width="100" /> <img src="http://www.google.lv/images/hp0.gif" height="10" width="100" /> <img src="http://www.google.lv/images/hp0.gif" height="100" width="100" /> <img src="http://www.google.lv/images/hp0.gif" height="20" width="60" /><br /> <img src="http://www.google.lv/images/hp0.gif" height="10" width="60" /> <img src="http://www.google.lv/images/hp0.gif" height="140" width="100" /> </div> NNB: nenosauktu to, kas to ir uzrakstījis par guru
Sandis Posted December 9, 2004 Author Report Posted December 9, 2004 Tu domaaji: $im = '<a href="./index.php?id=2&g='.$_REQUEST["g"].'π='.($z+($y*5)).'"><img src=".'.$GLOBALS["imglib"].'/'.$gal[$_REQUEST["g"]-1][1].'/'.$gal[$_REQUEST["g"]-1][3][$z+($y*5)].'" border="0"></a>'; samainiit ar : $im = '<a href="./index.php?id=2&g='.$_REQUEST["g"].'π='.($z+($y*5)).'"><img src=".'.$GLOBALS["imglib"].'/'.$gal[$_REQUEST["g"]-1][1].'/'.$gal[$_REQUEST["g"]-1][3][$z+($y*5)].'" border="0"></a>'.($x%5==0?'<br />':''); Nu nesakaarto - nemainaas izkaartojums! :(
Recommended Posts