Page 1 sur 1

tableau html

Posté : 30 déc. 2005, 17:38
par lionceau90
comment fait on pour régler les dimensions d'un tableau à la taille se son contenu?
Merci de vos réponses!

Posté : 30 déc. 2005, 17:46
par lionceau90
ou limiter la taille d'une cellule son contenu?

Posté : 30 déc. 2005, 18:19
par Cyrano
En ne mettant aucune dimensions, le tableau va s'adapter au contenu, tout simplement.

Posté : 31 déc. 2005, 16:18
par lionceau90
oui mais lorsque j'ajoute une photo la taille de la cellule voisine s'agrandit automatiquement et je n'arrive pas à la réajuster!

Posté : 31 déc. 2005, 17:04
par lionceau90
comment se fait-il qu'une photo inclue dans une cellule modifie la taille de la cellule voisine?

Posté : 31 déc. 2005, 17:47
par iclo
Il faudrait qu'on voit un peu de ton code

Posté : 31 déc. 2005, 18:04
par lionceau90
voici le code de ma page:
la photo qui me pose problème est celle située tout en bas"competitions.jpg" car elle modifie la taille de la cellule contenant le menu(le menu est fait a l'aide d'un tableau)

<html>
<head>
<title>Texte du titre</title>
</head>
<body style="margin:0px; padding:0px;" 
 bgcolor="#CC0000" link="#CC0000" vlink="#CC0000" alink="#CC0000" text="#000080"">
<div>
<TABLE BORDER=0 cellspacing="0" cellpadding="3">
<TR>
<TD colspan=2 WIDTH=100 style="margin:0px; padding:0px;"><img src="bande.gif"></TD>
</TR>
<TR>
<TD rowspan=2 style="margin:0px; padding:0px;">
<center><table border="1" cellpadding="3" cellspacing="0" bgcolor="#000080">
     <tr>
        <td><B><font color="#CC0000"><a href="tableau.htm" style="text-decoration:none;">Accueil</a></font></B></td>
    </tr>
        <tr>
        <td><B><font color=""><a href="actualite.htm" style="text-decoration:none;">Actualité</a></font></B></td>
    </tr>
    <tr>
        <td><B><font color="#CC0000"><a href="resultats.htm" style="text-decoration:none;">Résultats</a></font></B></td>
    </tr>
    <tr>
        <td><B><font color="#CC0000"><a href="calendrier.htm" style="text-decoration:none;">Calendrier</a></font></B></td>
    </tr>
    <tr>
        <td><B><font color="#CC0000"><a href="classement.htm" style="text-decoration:none;">Classement</a></font></B></td>
    </tr>
    <tr>
        <td><B><font color="#CC0000"><a href="effectif.htm" style="text-decoration:none;">Effectif</a></font></B></td>
    </tr>
    <tr>
        <td><B><font color="#CC0000"><a href="competitions.htm" style="text-decoration:none;">Compétitions</a></font></B></td>
    </tr>
    <tr>
        <td><B><font color="#CC0000"><a href="branche.htm" style="text-decoration:none;">Branche</a></font></B></td>
    </tr>
    <tr>
        <td><B><font color="#CC0000"><a href="histoire.htm" style="text-decoration:none;">Histoire</a></font></B></td>
    </tr>
<tr>
        <td><B><font color="#CC0000"><a href="stades.htm" style="text-decoration:none;">Stades</a></font></B></td>
    </tr>
<tr>
        <td><B><font color="#CC0000">Supporters</font></B></td>
    </tr>
<tr>
        <td><B><font color="#CC0000"><a href="http://www.munsterrugbystore.com" style="text-decoration:none;" target="_blank">Boutique</a></font></B></td>
    </tr>
<tr>
        <td><B><font color="#CC0000">Billeterie</font></B></td>
    </tr>
<tr>
        <td><B><font color="#CC0000">Liens</font></B></td>
    </tr>
<tr>
        <td><B><font color="#CC0000"><a href="contact.htm" style="text-decoration:none;">Contact</a></font></B></td>
    </tr>
</table>
</TR>
<TD VALIGN=top><TABLE BORDER=0 cellspacing="0" cellpadding="5">
<TR>
<TD><h1><font color="#000080">Compétitions</font></h1>

<p><font color="#000080"><strong>Choisissez une compétition:</strong></font></p>

<h3 align="center"><a href="ligueceltique.htm"><font
color="#000080">Ligue Celtique</font></a><font color="#000080"> -
<a href="coupeceltique.htm">Coupe Celtique</a> - <a href="coupeheineken.htm">Coupe Heineken</a></font></h3>

<p align="center"><img src="competitions.jpg" width="450"
height="298"></p>
</div>
</body>
</html>

Posté : 02 janv. 2006, 12:40
par charabia
Ton tableau est mal construit. Tu as des balises qui ne se ferment pas. J'ai corrigé rapidement ton code en incluant les css à la place de toutes tes fonts. Tu peux encore faire plus propre, reportes toi aux tutos sur les CSS.
<html> 
<head> 
<title>Texte du titre</title>
<style>
a {
	color:#cc0000;
	text-decoration: none;
	font-weight: bold;
}

a.lien:link { color: #000080; text-decoration: none;}
a.lien:active { color: #000080; text-decoration: none;}
a.lien:visited { color: #000080; text-decoration: none;}
a.lien:hover { color: #000080; text-decoration: none;}

.couleur {
	color:#000080;
}

.couleurg {
	color:#000080;
	font-weight: bold;
}

.couleurmenu {
	color:#cc0000;
	font-weight: bold;
}
</style>
</head> 
<body style="margin:0px; padding:0px;" bgcolor="#CC0000" link="#CC0000" vlink="#CC0000" alink="#CC0000" text="#000080">
<table border="0" cellspacing="0" cellpadding="0"> 
<tr>
	<td colspan="2"><img src="bande.gif"></td> 
</tr> 
<tr> 
	<td align="center">
	
	<table border="1" cellpadding="3" cellspacing="0" bgcolor="#000080"> 
     <tr> 
        <td><a href="tableau.htm">Accueil</a></td> 
    </tr> 
	<tr> 
		<td><a href="actualite.htm">Actualité</a></td> 
	</tr> 
	<tr> 
		<td><a href="resultats.htm">Résultats</a></td> 
	</tr> 
	<tr> 
		<td><a href="calendrier.htm">Calendrier</a></td> 
	</tr> 
	<tr> 
		<td><a href="classement.htm">Classement</a></td> 
	</tr> 
	<tr> 
		<td><a href="effectif.htm">Effectif</a></td> 
	</tr> 
	<tr> 
		<td><a href="competitions.htm">Compétitions</a></td> 
	</tr> 
	<tr> 
		<td><a href="branche.htm">Branche</a></td> 
	</tr> 
	<tr> 
		<td><a href="histoire.htm">Histoire</a></td> 
	</tr> 
	<tr>
		<td><a href="stades.htm">Stades</a></td> 
	</tr> 
	<tr> 
		<td class="couleurmenu">Supporters</td> 
	</tr> 
	<tr>
		<td><a href="http://www.munsterrugbystore.com" target="_blank">Boutique</a></td> 
	</tr> 
	<tr>
		<td class="couleurmenu">Billeterie</td> 
	</tr> 
	<tr>
		<td class="couleurmenu">Liens</td> 
	</tr> 
	<tr>
		<td><a href="contact.htm">Contact</a></td> 
	</tr> 
	</table>
	
	</td>
	<td valign="top">
	
	<table border="0" cellspacing="0" cellpadding="5"> 
	<tr>
		<td>
		<h1 class="couleur">Compétitions</h1> 
		<p class="couleurg">Choisissez une compétition:</p> 
		<h3 align="center"><a href="ligueceltique.htm" class="lien">Ligue Celtique</a> - <a href="coupeceltique.htm" class="lien">Coupe Celtique</a> - <a href="coupeheineken.htm" class="lien">Coupe Heineken</a></h3> 
		<p align="center"><img src="competitions.jpg" width="450" height="298"></p> 
		</td>
	</tr>
	</table>
	
	</td>
</tr>
</table>
</body> 
</html>