+33 3 83 56 65 26 +33 6 87 42 95 30 Cette adresse e-mail est protégée contre les robots spammeurs. Vous devez activer le JavaScript pour la visualiser. Lun-Ven : 9.00 à 17.00

positionner une image à droite d'un tableau

More
16 years 11 months ago - 16 years 10 months ago #14952 by atrix7
Bonjour,

j'ai un tableau qui affiche différentes informations
Code:
<table> [...] </table>

et j'aimerai mettre une image à droite de ce tableau dans ma page.
Code:
<img alt ="image" ALIGN="right" src="image.png" />

comment faire? J'arrive à la mettre en haut et en bas du tableau mais pas sur la droite.

Le code est un peu long mais le voici :
Code:
function showCatObjects($object,$params) { $livesite = JUri::root(); // show regular objects if(count($object) > 0) { ?> <br /> <table width="100%" border="0" cellspacing="1" cellpadding="1"> <tr> <td colspan="2" class="contentheading"><?php echo _ME_CURRENT_OFFERS;?><br /></td> </tr> <tr> <td colspan="2">&nbsp;</td> </tr> <?php $line=1; echo $obj->created_by; foreach($object as $obj) { $params['tbwidth'] = 90; $pic = MEImage::loadFirstPic($obj->id,$params['picpath'],$params['tbwidth']); $hotpic = '<img valign="middle" src="'.$livesite.'components/com_misterestate/gui/hot.png" border="0" alt="Top" />'; ?> <tr> <td valign="top" rowspan="3" width="<?php echo $params['tbwidth'];?>"> <?php if($params['readmore']) { echo '<a href="'.sefRelToAbs('index.php?option=com_misterestate&act=object&task=showME&Itemid='.$params['Itemid'].'&id='.$obj->id).'">'; } echo $obj->created_by; echo $pic; if($params['readmore']) { echo "</a>";echo $obj->created_by; } ?> </td> <td class="sectiontableentry2" width="95%" height="15px" valign="top"> <img src="<?php echo $livesite;?>images/M_images/arrow.png" alt="" border="0" />&nbsp; <?php if($params['readmore']) { ?> <a href="<?php echo sefRelToAbs('index.php?option=com_misterestate&act=object&task=showME&Itemid='.$params['Itemid'].'&id='.$obj->id);?>"> <?php } ?> <b><?php echo $obj->title;?></b>&nbsp;&nbsp; <?php if($obj->hot) echo $hotpic; if($params['readmore']) { ?> </a> <?php } ?> </td> </tr> <?php if($obj->description != "" && $obj->description != "<br />" && $obj->description != "</p>") { ?> <tr> <td class="smalldark" valign="top"> <?php echo substr($obj->description,0,$params['shorttext']);?>... <?php if($params['readmore']) { echo '<a href="'.sefRelToAbs('index.php?option=com_misterestate&act=object&task=showME&Itemid='.$params['Itemid'].'&id='.$obj->id).'">'; echo _ME_READ_MORE; echo '</a>'; } else{ echo '<a href="'.sefRelToAbs('inex.php?option=com_registration&task=register&Itemid='.$params['Itemid']).'">'; echo _ME_REGISTER_FOR_MOREINFO; echo "</a>"; } ?> </td> </tr> <?php } else{ ?> <tr> <td class="smalldark" valign="top">&nbsp;</td> </tr> <?php } ?> <tr> <td height="14px" class="smalldark" style="text-align:right"> <?php if($obj->rent > 0.00) $value = number_format($obj->rent,0,$params['sep2'],$params['sep1']) . "&nbsp;" . $params['currency']; else if($obj->price > 0.00) $value = number_format($obj->price,0,$params['sep2'],$params['sep1']) . "&nbsp;" . $params['currency']; else $value = "0.00&nbsp;" . $params['currency']; ?> </td> </tr> <?php $line++; } ?> </table> <?php } }
Last edit: 16 years 10 months ago by atrix7.

Please Connectez-vous or Create an account to join the conversation.

More
16 years 11 months ago #14956 by tramber91
Bonjour,

sans passer par les cSS

question toute bete si tu rajoutes une colonne à ton tableau (avec rowspan le nombre de ligne) et ty y mets ta photo c'est OK ?

Sinon tu creée un autre tableau qui comprend 2 colonnes la premiere avec ton tableau et la 2eme avec ton image

@+

Pas de support en MP sans y être invité. Merci
Merci de vous conformer aux règles du forum. Un merci, Cela fait toujours plaisir ;)
www.en-toutes-lettres.fr - Digital

Please Connectez-vous or Create an account to join the conversation.

More
16 years 10 months ago - 16 years 10 months ago #14977 by atrix7
j'ai essayé en mettant ça à la fin du tableau :
Code:
<tr> <img src="image.png" alt="" border="0" /> </tr>

mais l'image apparait au dessus du tableau.

j'ai essayé :
Code:
<table border="1" > <tr> <table>....</table> </tr> <tr> <img ...> </tr> </table>

mais l'image apparait au dessus du tableau aussi.
Last edit: 16 years 10 months ago by atrix7.

Please Connectez-vous or Create an account to join the conversation.

More
16 years 10 months ago #14978 by tramber91
Bonjour

quand tu dis

j'ai essayé en mettant ça à la fin du tableau

<tr>
<img src="image.png" alt="" border="0" />
</tr>


il manque les balises de colonne <td></td> ???

@+

Pas de support en MP sans y être invité. Merci
Merci de vous conformer aux règles du forum. Un merci, Cela fait toujours plaisir ;)
www.en-toutes-lettres.fr - Digital

Please Connectez-vous or Create an account to join the conversation.

More
16 years 10 months ago #14982 by atrix7
Code:
</tr> <tr> <td> <img alt ="aa" ALIGN="right" src="image.png" /> </td> </tr>


En faisant ça, l'image apparait en dessous du tableau.

Please Connectez-vous or Create an account to join the conversation.

More
16 years 10 months ago #14983 by tramber91
Je peux avoir un lien vers la page

merci

Pas de support en MP sans y être invité. Merci
Merci de vous conformer aux règles du forum. Un merci, Cela fait toujours plaisir ;)
www.en-toutes-lettres.fr - Digital

Please Connectez-vous or Create an account to join the conversation.

Moderators: lavsteph, tramber91, Scottux, serge
Time to create page: 0.157 seconds

News Communautés

News sécurité