- Posts: 29
- Thank you received: 0
positionner une image à droite d'un tableau
16 years 11 months ago - 16 years 10 months ago #14952
by atrix7
positionner une image à droite d'un tableau was created by atrix7
Bonjour,
j'ai un tableau qui affiche différentes informations
et j'aimerai mettre une image à droite de ce tableau dans ma page.
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 :
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"> </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" />
<?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>
<?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"> </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']) . " " . $params['currency'];
else if($obj->price > 0.00) $value = number_format($obj->price,0,$params['sep2'],$params['sep1']) . " " . $params['currency'];
else $value = "0.00 " . $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.
16 years 11 months ago #14956
by tramber91
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
Replied by tramber91 on topic Re:positionner une image à droite d'un tableau
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
@+
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.
16 years 10 months ago - 16 years 10 months ago #14977
by atrix7
Replied by atrix7 on topic Re:positionner une image à droite d'un tableau
j'ai essayé en mettant ça à la fin du tableau :
mais l'image apparait au dessus du tableau.
j'ai essayé :
mais l'image apparait au dessus du tableau aussi.
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.
16 years 10 months ago #14978
by tramber91
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
Replied by tramber91 on topic Re:positionner une image à droite d'un tableau
Bonjour
quand tu dis
il manque les balises de colonne <td></td> ???
@+
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.
16 years 10 months ago #14982
by atrix7
En faisant ça, l'image apparait en dessous du tableau.
Replied by atrix7 on topic Re:positionner une image à droite d'un tableau
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.
16 years 10 months ago #14983
by tramber91
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
Replied by tramber91 on topic Re:positionner une image à droite d'un tableau
Je peux avoir un lien vers la page
merci
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.
Time to create page: 0.157 seconds
