|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
telnes Smarty Rookie
Joined: 09 Aug 2005 Posts: 7
|
Posted: Tue Sep 06, 2005 10:12 am Post subject: problème de tableau html |
|
|
bonjour
alors je vais essayé d'être claire
je passe un tableau php et je récupère le tout dans une boucle foreach
Code: |
<table align="center" border="1" width="100%" cellspacing="5" cellpadding="5">
<tr>
<td valign="top">
{foreach key=id item=value from=$box1}
<script>{literal}wr1('ff9933'){/literal}</script>
<div valign="top" style="cursor:hand; width:150; height=200" onclick="window.location='candidature.php?way=candidaturetest&boite={$return}&id={$id}';">
{$value}
</div>
<script>{literal}wr2('FF9933'){/literal}</script>
<br>
{/foreach}
</td >
<td valign="top">
{foreach key=id item=value from=$box2}
<script>{literal}wr1('ff9933'){/literal}</script>
<div valign="top" style="cursor:hand; width:150; height=200" onclick="window.location='candidature.php?way=candidaturetest&boite={$return}&id={$id}';">
{$value}
</div>
<script>{literal}wr2('FF9933'){/literal}</script>
<br>
{/foreach}
</td>
</tr>
</table>
|
le truc c'est que ca me fait un tableau avec deux colonnes, ce qui est normal puisque c'est ce que je lui demande.
moi j aimerais mettre 2 div cote a cote (c'est a dire 4 div en tout ) 2 par colonnes
#######################################
#div1 de box1, div2 de box2 # div1 de box2, div2 de box2 #
#######################################
#div3 de box1, div4 de box2 # div3 de box2, div4 de box2 #
#######################################
#..................
moi j avais penser faire des <tr><td> dynamique mais j arrive pas à les gérér dans mon tpl :/
si quelqu un a une idée ? je suis preneur
peut etre il faut utiliser l'option pour faire des tableau html avec les paramètre et que je lui passe mon "code javascript" coté php ?
merci d avance
++ _________________ http://telnesmaster.free.fr LiteTemplate |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|