Centrer menu Html
Forum Programmation : Centrer menu Html
Bonjour,
Je viens de créer un site et j'ai un petit problème, en fait j'ai fait un menu qui est en haut a gauche mais lorsque je rallonge la page le menu vient ce centrer automatiquement au milieu alors que je veux qu'il reste toujours en haut...
Je sais c'est pas très précis donc voila les liens :
http://cyberborz.ifrance.com/ ---> Menu en haut a gauche comme il faut...
http://cyberborz.ifrance.com/video.html ---> Menu centré verticalement...
Voila mon code HTML :
<HTML>
<HEAD>
<TITLE>Welcome to CyberBorz</TITLE>
<META HTTP-EQUIV="Content-Type"
CONTENT="text/html; charset=iso-8859-1">
<META NAME="generator" CONTENT="Namo WebEditor v5.0">
</HEAD>
<BODY BGCOLOR="#4B4B4B" LEFTMARGIN="0" TOPMARGIN="0" MARGINWIDTH="0"
MARGINHEIGHT="0">
<TABLE WIDTH="800" BORDER="0" CELLPADDING="0" CELLSPACING="0"
ALIGN="center">
<TR>
<TD COLSPAN="5">
<IMG SRC="images/index_01.jpg" WIDTH="800"
HEIGHT="18" ALT=""></td>
</tr>
<TR>
<TD ROWSPAN="2">
<IMG SRC="images/index_02.jpg" WIDTH="29"
HEIGHT="117" ALT=""></td>
<TD>
<IMG SRC="images/index_03.jpg" WIDTH="389"
HEIGHT="102" ALT=""></td>
<TD COLSPAN="2">
<IMG SRC="images/index_04.jpg" WIDTH="354"
HEIGHT="102" ALT=""></td>
<TD ROWSPAN="2">
<IMG SRC="images/index_05.jpg" WIDTH="28"
HEIGHT="117" ALT=""></td>
</tr>
<TR>
<TD COLSPAN="3" WIDTH="743" HEIGHT="15"
BACKGROUND="images/index_06.jpg">
<TABLE CELLPADDING="0" CELLSPACING="0" WIDTH="100%">
<TR>
<TD WIDTH="68">
<P>
<font size="1"> </font></td>
<TD WIDTH="675">
<P>
<font size="1"> </font></td>
</tr>
</TABLE>
</td>
</tr>
<TR>
<TD BACKGROUND="images/index_07.jpg">
</td>
<TD COLSPAN="3" BGCOLOR="white">
<TABLE CELLPADDING="0" CELLSPACING="0" WIDTH="100%">
<TR>
<TD WIDTH="181">
<TABLE CELLPADDING="0" CELLSPACING="0"
WIDTH="148" ALIGN="center">
<TR>
<TD WIDTH="138"
STYLE="border-bottom-width:1; border-bottom-color:rgb(229,228,228); border-bottom-style:solid;">
<P>
<b><font color="#1F5697" face="Arial"><span style="font-size:11pt; letter-spacing:1;"> Menu
</span></font></b></td>
</tr>
<TR>
<TD WIDTH="138">
<P>
<font size="1" color="black"> </font></td>
</tr>
<TR>
<TD WIDTH="138">
<UL>
<LI>
<span style="font-size:8pt;"><font face="Tahoma" color="black">
<a href="http://cyberborz.ifrance.com">Home</a>
</font></span>
<LI>
<span style="font-size:8pt;"><font face="Tahoma" color="black">
<a href="http://cyberborz.ifrance.com/news.html">News</a>
</font></span>
<LI>
<span style="font-size:8pt;"><font face="Tahoma" color="black">
<a href="http://cyberborz.ifrance.com/articles.html">Articles</a>
</font></span>
<LI>
<span style="font-size:8pt;"><font face="Tahoma" color="black">
<a href="http://cyberborz.heberg-forum.net" target="_blank">Forum</a>
</font></span>
<LI>
<span style="font-size:8pt;"><font face="Tahoma" color="black">
<a href="http://cyberborz.ifrance.com/galerie.html">Gallery</a>
</font></span>
</UL>
</td>
</tr>
</TABLE>
<TABLE CELLPADDING="0" CELLSPACING="0"
WIDTH="148" ALIGN="center">
<TR>
<TD WIDTH="138"
STYLE="border-bottom-width:1; border-bottom-color:rgb(229,228,228); border-bottom-style:solid;">
<P>
<b><font color="#1F5697" face="Arial"><span style="font-size:11pt; letter-spacing:1;"> Downloads
</span></font></b></td>
</tr>
<TR>
<TD WIDTH="138">
<P>
<font size="1" color="black"> </font></td>
</tr>
<TR>
<TD WIDTH="138">
<UL>
<LI>
<span style="font-size:8pt;"><font face="Tahoma" color="black">
<a href="http://cyberborz.ifrance.com/video.html">Video</a>
</font></span>
<LI>
<span style="font-size:8pt;"><font face="Tahoma" color="black">
<a href="http://cyberborz.ifrance.com/audio.html">Audio</a>
</font></span>
<LI>
<span style="font-size:8pt;"><font face="Tahoma" color="black">
<a href="http://cyberborz.ifrance.com/games.html">Games</a>
</font></span>
<LI>
<span style="font-size:8pt;"><font face="Tahoma" color="black">
<a href="http://cyberborz.ifrance.com/softs.html">Softs</a>
</font></span>
</UL>
</td>
</tr>
</TABLE>
<TABLE CELLPADDING="0" CELLSPACING="0"
WIDTH="148" ALIGN="center">
<TR>
<TD WIDTH="138"
STYLE="border-bottom-width:1; border-bottom-color:rgb(229,228,228); border-bottom-style:solid;">
<P>
<b><font color="#1F5697" face="Arial"><span style="font-size:11pt; letter-spacing:1;"> Links
</span></font></b></td>
</tr>
<TR>
<TD WIDTH="138">
<P>
<font size="1" color="black"> </font></td>
</tr>
<TR>
<TD WIDTH="138">
<UL>
<LI>
<span style="font-size:8pt;"><font face="Tahoma" color="black">
<a href="http://www.kavkazcenter.com" target="_blank">Kavkazcenter.com</a>
</font></span>
<LI>
<span style="font-size:8pt;"><font face="Tahoma" color="black">
<a href="http://www.damatoh.com" target="_blank">Damatoh.com</a>
</font></span>
<LI>
<span style="font-size:8pt;"><font face="Tahoma" color="black">
<a href="http://www.djigit.com" target="_blank">Djigit.com</a>
</font></span>
<LI>
<span style="font-size:8pt;"><font face="Tahoma" color="black">
<a href="http://orlean.ucoz.ru" target="_blank">Orlean.ukoz.ru</a>
</font></span>
<LI>
<span style="font-size:8pt;"><font face="Tahoma" color="black">
<a href="http://www.kavkazchat.com" target="_blank">Kavkazchat.com</a>
</font></span>
</UL>
</td>
</tr>
</TABLE>
</td>
<TD WIDTH="562">
<P>
<b><font color="#1F5697" face="Arial"><span style="font-size:11pt; letter-spacing:1;"> <BR>
Video
</span></font></b>
<P ALIGN="justify"
STYLE="margin-right:8;">
<span style="font-size:8pt;"><font face="Tahoma">
<a href="http://cyberborz.ifrance.com/v009"><IMG SRC="http://www.bloodtrails.com/img/index.jpg" WIDTH="400" HEIGHT="600" ALT=""></a>
<a href="http://cyberborz.ifrance.com/v007"><IMG SRC="http://images.gildia.pl/film/filmy/headspace/posters/poster03/w120" WIDTH="400" HEIGHT="600" ALT=""</a>
<TR>
<TD WIDTH="743" COLSPAN="2">
<P>
<font color="black"> </font></td>
</tr>
</TABLE>
</td>
<TD BACKGROUND="images/index_09.jpg">
</td>
</tr>
<TR>
<TD ROWSPAN="2">
<IMG SRC="images/index_10.jpg" WIDTH="29" HEIGHT="65"
ALT=""></td>
<TD COLSPAN="2">
<IMG SRC="images/index_11.jpg" WIDTH="599"
HEIGHT="45" ALT=""></td>
<TD>
<IMG SRC="images/index_12.jpg"
BORDER="0" WIDTH="144" HEIGHT="45" ALT=""></a></td>
<TD ROWSPAN="2">
<IMG SRC="images/index_13.jpg" WIDTH="28" HEIGHT="65"
ALT=""></td>
</tr>
<TR>
<TD COLSPAN="3">
<IMG SRC="images/index_14.jpg" WIDTH="743"
HEIGHT="20" ALT=""></td>
</tr>
<TR>
<TD>
<IMG SRC="images/spacer.gif" WIDTH="29" HEIGHT="1"
ALT=""></td>
<TD>
<IMG SRC="images/spacer.gif" WIDTH="389" HEIGHT="1"
ALT=""></td>
<TD>
<IMG SRC="images/spacer.gif" WIDTH="210" HEIGHT="1"
ALT=""></td>
<TD>
<IMG SRC="images/spacer.gif" WIDTH="144" HEIGHT="1"
ALT=""></td>
<TD>
<IMG SRC="images/spacer.gif" WIDTH="28" HEIGHT="1"
ALT=""></td>
</tr>
</TABLE>
</BODY>
</HTML>
Message édité par fb417508 le 12-08-2006 à 15:46:14
Bah il est bien placé si tu parle bien du menu en haut, il ce centre automatiquement en fonction de la taille de la page je trouve ca bien comme ca ^^
Nan j'aime pas ^^
Je voudrais qu'il reste toujours en haut mais il se centre a chaque fois au milieu de la page :x
A oui désolé je n'avais pas vu
Bah tu utilse quelle editeur html ?
Parce que je sais qu'avec dreamweaver des fois les saut de ligne n'était pas comme je voulais non plus donc j'ai fait ça avec NVU ou sinon tu prend la source de la page qui "fonctionne" et tu modifie juste la ou tu mes ta vidéo
@sliverman réfléchit un peu plus avant de répondre , c'est pas une question de saut de ligne ... mais d'alignement dans une balise td .
Définit un alignement vertical à top , ca arrange le problème .
<TD COLSPAN="3" BGCOLOR="white">
<TABLE CELLPADDING="0" CELLSPACING="0" WIDTH="100%">
<TR>
<TD WIDTH="181" style="vertical-align:top;">
edit : je vais quand même donner l'explication . Les deux balises TD sont liées à la même ligne , c'est-à-dire que si l'une grandit , l'autre grandira de la même taille etant donné qu'aucune hauteur n'est définie . Par défaut le centrage vertical dans une balise td est middle .
Message édité par RiiMii le 12-08-2006 à 17:49:16
Utilise " float"!
Dans ta partie menu, tu marques:
{
float: center;
}
Voilà, j'espère que ca t'aidera
OK mci bcp a vous tous
Riimii est ce que tu peux intégrer ton code au mien stp parce que je suis vraiment nul en HTML :s
Merci encore
UP plz
Dryku , je peux savoir elle est ou l'utilité d'utiliser un float:center ?
A part te faire sortir du flux normal de la page je ne vois pas ou l'alignement vertical est reglé ...
Voila fb417508
<HTML>
<HEAD>
<TITLE>Welcome to CyberBorz</TITLE>
<META HTTP-EQUIV="Content-Type"
CONTENT="text/html; charset=iso-8859-1">
<META NAME="generator" CONTENT="Namo WebEditor v5.0">
</HEAD>
<BODY BGCOLOR="#4B4B4B" LEFTMARGIN="0" TOPMARGIN="0" MARGINWIDTH="0"
MARGINHEIGHT="0">
<TABLE WIDTH="800" BORDER="0" CELLPADDING="0" CELLSPACING="0"
ALIGN="center">
<TR>
<TD COLSPAN="5">
<IMG SRC="images/index_01.jpg" WIDTH="800"
HEIGHT="18" ALT=""></td>
</tr>
<TR>
<TD ROWSPAN="2">
<IMG SRC="images/index_02.jpg" WIDTH="29"
HEIGHT="117" ALT=""></td>
<TD>
<IMG SRC="images/index_03.jpg" WIDTH="389"
HEIGHT="102" ALT=""></td>
<TD COLSPAN="2">
<IMG SRC="images/index_04.jpg" WIDTH="354"
HEIGHT="102" ALT=""></td>
<TD ROWSPAN="2">
<IMG SRC="images/index_05.jpg" WIDTH="28"
HEIGHT="117" ALT=""></td>
</tr>
<TR>
<TD COLSPAN="3" WIDTH="743" HEIGHT="15"
BACKGROUND="images/index_06.jpg">
<TABLE CELLPADDING="0" CELLSPACING="0" WIDTH="100%">
<TR>
<TD WIDTH="68">
<P>
<font size="1"> </font></td>
<TD WIDTH="675">
<P>
<font size="1"> </font></td>
</tr>
</TABLE>
</td>
</tr>
<TR>
<TD BACKGROUND="images/index_07.jpg">
</td>
<TD COLSPAN="3" BGCOLOR="white">
<TABLE CELLPADDING="0" CELLSPACING="0" WIDTH="100%">
<TR>
<TD WIDTH="181 style="vertical-align:top;">
<TABLE CELLPADDING="0" CELLSPACING="0"
WIDTH="148" ALIGN="center">
<TR>
<TD WIDTH="138"
STYLE="border-bottom-width:1; border-bottom-color:rgb(229,228,228); border-bottom-style:solid;">
<P>
<b><font color="#1F5697" face="Arial"><span style="font-size:11pt; letter-spacing:1;"> Menu
</span></font></b></td>
</tr>
<TR>
<TD WIDTH="138">
<P>
<font size="1" color="black"> </font></td>
</tr>
<TR>
<TD WIDTH="138">
<UL>
<LI>
<span style="font-size:8pt;"><font face="Tahoma" color="black">
<a href="http://cyberborz.ifrance.com">Home</a>
</font></span>
<LI>
<span style="font-size:8pt;"><font face="Tahoma" color="black">
<a href="http://cyberborz.ifrance.com/news.html">News</a>
</font></span>
<LI>
<span style="font-size:8pt;"><font face="Tahoma" color="black">
<a href="http://cyberborz.ifrance.com/articles.html">Articles</a>
</font></span>
<LI>
<span style="font-size:8pt;"><font face="Tahoma" color="black">
<a href="http://cyberborz.heberg-forum.net" target="_blank">Forum</a>
</font></span>
<LI>
<span style="font-size:8pt;"><font face="Tahoma" color="black">
<a href="http://cyberborz.ifrance.com/galerie.html">Gallery</a>
</font></span>
</UL>
</td>
</tr>
</TABLE>
<TABLE CELLPADDING="0" CELLSPACING="0"
WIDTH="148" ALIGN="center">
<TR>
<TD WIDTH="138"
STYLE="border-bottom-width:1; border-bottom-color:rgb(229,228,228); border-bottom-style:solid;">
<P>
<b><font color="#1F5697" face="Arial"><span style="font-size:11pt; letter-spacing:1;"> Downloads
</span></font></b></td>
</tr>
<TR>
<TD WIDTH="138">
<P>
<font size="1" color="black"> </font></td>
</tr>
<TR>
<TD WIDTH="138">
<UL>
<LI>
<span style="font-size:8pt;"><font face="Tahoma" color="black">
<a href="http://cyberborz.ifrance.com/video.html">Video</a>
</font></span>
<LI>
<span style="font-size:8pt;"><font face="Tahoma" color="black">
<a href="http://cyberborz.ifrance.com/audio.html">Audio</a>
</font></span>
<LI>
<span style="font-size:8pt;"><font face="Tahoma" color="black">
<a href="http://cyberborz.ifrance.com/games.html">Games</a>
</font></span>
<LI>
<span style="font-size:8pt;"><font face="Tahoma" color="black">
<a href="http://cyberborz.ifrance.com/softs.html">Softs</a>
</font></span>
</UL>
</td>
</tr>
</TABLE>
<TABLE CELLPADDING="0" CELLSPACING="0"
WIDTH="148" ALIGN="center">
<TR>
<TD WIDTH="138"
STYLE="border-bottom-width:1; border-bottom-color:rgb(229,228,228); border-bottom-style:solid;">
<P>
<b><font color="#1F5697" face="Arial"><span style="font-size:11pt; letter-spacing:1;"> Links
</span></font></b></td>
</tr>
<TR>
<TD WIDTH="138">
<P>
<font size="1" color="black"> </font></td>
</tr>
<TR>
<TD WIDTH="138">
<UL>
<LI>
<span style="font-size:8pt;"><font face="Tahoma" color="black">
<a href="http://www.kavkazcenter.com" target="_blank">Kavkazcenter.com</a>
</font></span>
<LI>
<span style="font-size:8pt;"><font face="Tahoma" color="black">
<a href="http://www.damatoh.com" target="_blank">Damatoh.com</a>
</font></span>
<LI>
<span style="font-size:8pt;"><font face="Tahoma" color="black">
<a href="http://www.djigit.com" target="_blank">Djigit.com</a>
</font></span>
<LI>
<span style="font-size:8pt;"><font face="Tahoma" color="black">
<a href="http://orlean.ucoz.ru" target="_blank">Orlean.ukoz.ru</a>
</font></span>
<LI>
<span style="font-size:8pt;"><font face="Tahoma" color="black">
<a href="http://www.kavkazchat.com" target="_blank">Kavkazchat.com</a>
</font></span>
</UL>
</td>
</tr>
</TABLE>
</td>
<TD WIDTH="562">
<P>
<b><font color="#1F5697" face="Arial"><span style="font-size:11pt; letter-spacing:1;"> <BR>
Video
</span></font></b>
<P ALIGN="justify"
STYLE="margin-right:8;">
<span style="font-size:8pt;"><font face="Tahoma">
<a href="http://cyberborz.ifrance.com/v009"><IMG SRC="http://www.bloodtrails.com/img/index.jpg" WIDTH="400" HEIGHT="600" ALT=""></a>
<a href="http://cyberborz.ifrance.com/v007"><IMG SRC="http://images.gildia.pl/film/filmy/headspace/posters/poster03/w120" WIDTH="400" HEIGHT="600" ALT=""</a>
<TR>
<TD WIDTH="743" COLSPAN="2">
<P>
<font color="black"> </font></td>
</tr>
</TABLE>
</td>
<TD BACKGROUND="images/index_09.jpg">
</td>
</tr>
<TR>
<TD ROWSPAN="2">
<IMG SRC="images/index_10.jpg" WIDTH="29" HEIGHT="65"
ALT=""></td>
<TD COLSPAN="2">
<IMG SRC="images/index_11.jpg" WIDTH="599"
HEIGHT="45" ALT=""></td>
<TD>
<IMG SRC="images/index_12.jpg"
BORDER="0" WIDTH="144" HEIGHT="45" ALT=""></a></td>
<TD ROWSPAN="2">
<IMG SRC="images/index_13.jpg" WIDTH="28" HEIGHT="65"
ALT=""></td>
</tr>
<TR>
<TD COLSPAN="3">
<IMG SRC="images/index_14.jpg" WIDTH="743"
HEIGHT="20" ALT=""></td>
</tr>
<TR>
<TD>
<IMG SRC="images/spacer.gif" WIDTH="29" HEIGHT="1"
ALT=""></td>
<TD>
<IMG SRC="images/spacer.gif" WIDTH="389" HEIGHT="1"
ALT=""></td>
<TD>
<IMG SRC="images/spacer.gif" WIDTH="210" HEIGHT="1"
ALT=""></td>
<TD>
<IMG SRC="images/spacer.gif" WIDTH="144" HEIGHT="1"
ALT=""></td>
<TD>
<IMG SRC="images/spacer.gif" WIDTH="28" HEIGHT="1"
ALT=""></td>
</tr>
</TABLE>
</BODY>
</HTML>
Il y a 1311 utilisateurs connus et inconnus. Pour voir la liste des connectés connus, cliquez ici.
