Centrer une image au sein d'une page html

2 participants

Voir le sujet précédent Voir le sujet suivant Aller en bas

Résolu Centrer une image au sein d'une page html

Message par emc2 Mer 25 Juil 2012 - 11:58

Bonjour,

J'ai créé une page html sur mon forum, (la page), mais je ne parviens pas à la centrer par rapport à la présentation globale. elle se colle invariablement à gauche. peut-on me donner la solution qui la placerait au centre de la présentation ?
Merci de votre aide.

ps: au passage, pouvez-vous me dire si vous entendez le bruit de mer quand vous vous y rendez, car certains membres ne l'entende pas, et d'autres oui.
Les codes de la carte, il y a le bandeau au-dessus de la carte, et le lecteur mp3 à la fin
Code:
<table width="87%" cellpadding="3" cellspacing="1" border="0" bgcolor="#000000">
    <tr>
          <td width=10 style="color:white" bgcolor="#b8b885">></td>
          <td style="color="#b8b885";font-weight:bold" bgcolor="#b8b885">CARTE DU JEU derniere maj 25-07-12</td>
    </tr>
</table>

<img usemap="#page_d_accueil" src="http://www.archive-host.com/files/1676537/971e6b8110bd71cb5648125842a5ee4cef93a149/1024_villes.png" width="1024" height="1024" border="0">
<map name="page_d_accueil">
<area shape="rect" title="Kanayé" coords="204,63,209,68" href="http://sainte-croix.forumgratuit.org/h1-carte-interactive">
<area shape="rect" title="Port-Royal" coords="537,541,542,546" href="http://sainte-croix.forumgratuit.org/h1-carte-interactive">
<area shape="rect" title="Sainte-Croix" coords="862,67,867,72" href="http://sainte-croix.forumgratuit.org/h1-carte-interactive">
<area shape="rect" title="Collense" coords="555,239,560,244" href="http://sainte-croix.forumgratuit.org/h1-carte-interactive">
<area shape="rect" title="Basses-mines" coords="506,77,511,82" href="http://sainte-croix.forumgratuit.org/h1-carte-interactive">
<area shape="rect" title="Les-Forges" coords="808,371,813,376" href="http://sainte-croix.forumgratuit.org/h1-carte-interactive">
<area shape="rect" title="Espéride" coords="208,279,213,284" href="http://sainte-croix.forumgratuit.org/h1-carte-interactive">
<area shape="rect" title="La-Tisserie" coords="312,400,317,405" href="http://sainte-croix.forumgratuit.org/h1-carte-interactive">
<area shape="rect" title="Les-Scieries" coords="362,304,367,309" href="http://sainte-croix.forumgratuit.org/h1-carte-interactive">
<area shape="rect" title="Haut-Marche" coords="385,954,390,959" href="http://sainte-croix.forumgratuit.org/h1-carte-interactive">
<area shape="rect" title="Auberge du pendu" coords="261,598,266,603" href="http://sainte-croix.forumgratuit.org/h1-carte-interactive">
<area shape="rect" title="Les chantiers navals" coords="498,744,503,749" href="http://sainte-croix.forumgratuit.org/h1-carte-interactive">
<area shape="rect" title="Puits-du-Bouc" coords="100,520,105,525" href="http://sainte-croix.forumgratuit.org/h1-carte-interactive">
<area shape="rect" title="Pas-du-Levant" coords="991,740,996,745" href="http://sainte-croix.forumgratuit.org/h1-carte-interactive">
<area shape="rect" title="Hospital" coords="924,512,929,517" href="http://sainte-croix.forumgratuit.org/h1-carte-interactive">
<area shape="rect" title="Baie-des-geoles" coords="623,66,628,71" href="http://sainte-croix.forumgratuit.org/h1-carte-interactive">
<area shape="rect" title="Cap Nord" coords="329,788,334,793" href="http://sainte-croix.forumgratuit.org/h1-carte-interactive">
<area shape="rect" title="Les-Chenaux" coords="862,277,867,282" href="http://sainte-croix.forumgratuit.org/h1-carte-interactive">
<area shape="poly" title="L'île des pirates" coords="201, 17, 175, 37, 175, 52, 181, 59, 197, 69, 222, 71, 247, 63, 253, 56, 252, 47, 230, 22, 222, 17, 201, 17" href="http://sainte-croix.forumgratuit.org/h1-carte-interactive">
<area shape="poly" title="L'île du Lézard" coords="321, 358, 283, 394, 268, 449, 283, 449, 338, 392, 321, 358" href="http://sainte-croix.forumgratuit.org/h1-carte-interactive">
<area shape="poly" title="Comptoir des boucaniers" coords="49, 495, 17, 518, 17, 543, 119, 529, 180, 496, 176, 485, 135, 490, 96, 510, 49, 495" href="http://sainte-croix.forumgratuit.org/h1-carte-interactive">
<area shape="poly" title="Royaume des Terres du Levant" coords="790, 0, 757, 32, 861, 94, 808, 111, 849, 220, 782, 244, 747, 350, 810, 382, 1003, 406, 940, 597, 983, 746, 1024, 750, 1024, 0, 790, 0"
href="http://sainte-croix.forumgratuit.org/h1-carte-interactive">
<area shape="poly" title="Royaume du triangle" coords="328, 786, 266, 886, 238, 967, 411, 966, 415, 948, 381, 862, 328, 786" href="http://sainte-croix.forumgratuit.org/h1-carte-interactive">
<area shape="poly" title="Royaume des Espérides" coords="164, 204, 109, 212, 59, 251, 36, 294, 33, 325, 42, 338, 63, 358, 160, 403, 214, 332, 200, 225, 164, 204" href="http://sainte-croix.forumgratuit.org/h1-carte-interactive">
<area shape="poly" title="Les Provinces-Unies" coords="485, 42, 403, 133, 311, 273, 309, 291, 399, 368, 461, 277, 565, 311, 713, 169, 692, 84, 647, 57, 525, 31, 497, 33, 485, 42" href="http://sainte-croix.forumgratuit.org/h1-carte-interactive">
<area shape="poly" title="Royaume des grandes Terres" coords="677, 356, 504, 452, 465, 486, 452, 505, 445, 621, 506, 787, 598, 875, 683, 904, 798, 918, 874, 917, 917, 897, 928, 854, 928, 454, 915, 430, 863, 399, 718, 361, 677, 356" href="http://sainte-croix.forumgratuit.org/h1-carte-interactive">
<area shape="poly" title="Les îles désertes" coords="244, 550, 196, 573, 184, 601, 183, 625, 198, 655, 230, 680, 283, 692, 291, 689, 351, 636, 344, 553, 244, 550" href="http://sainte-croix.forumgratuit.org/h1-carte-interactive">
<area shape="poly" title="L'île de la Flibuste" coords="139, 741, 109, 756, 94, 769, 49, 773, 33, 784, 33, 808, 37, 811, 100, 824, 130, 825, 182, 799, 189, 786, 182, 774, 148, 745, 139, 741" </map>

<object type="application/x-shockwave-flash" data="http://flash-mp3-player.net/medias/player_mp3_maxi.swf" width="100" height="3">
    <param name="movie" value="http://flash-mp3-player.net/medias/player_mp3_maxi.swf" />
    <param name="bgcolor" value="#000000" />
    <param name="FlashVars" value="mp3=http://www.light2art.de/MP3/Meeresbrandung-auf-Felsen.mp3&amp;autoplay=1&amp;volume=125" />
</object>


Dernière édition par emc2 le Mer 25 Juil 2012 - 15:11, édité 1 fois
emc2

emc2
*****

Messages : 555
Inscrit(e) le : 30/09/2011

http://sainte-croix.forumgratuit.org/
emc2 a été remercié(e) par l'auteur de ce sujet.

Résolu Re: Centrer une image au sein d'une page html

Message par Madeal Mer 25 Juil 2012 - 14:46

Essayez ceci Smile :
Code:
    <center><table width="87%" cellpadding="3" cellspacing="1" border="0" bgcolor="#000000">
        <tr>
              <td width=10 style="color:white" bgcolor="#b8b885">&gt;</td>
              <td style="color="#b8b885";font-weight:bold" bgcolor="#b8b885">CARTE DU JEU derniere maj 25-07-12</td>
        </tr>
    </table>

    <img usemap="#page_d_accueil" src="http://www.archive-host.com/files/1676537/971e6b8110bd71cb5648125842a5ee4cef93a149/1024_villes.png" width="1024" height="1024" border="0">
    <map name="page_d_accueil">
    <area shape="rect" title="Kanayé" coords="204,63,209,68" href="http://sainte-croix.forumgratuit.org/h1-carte-interactive">
    <area shape="rect" title="Port-Royal" coords="537,541,542,546" href="http://sainte-croix.forumgratuit.org/h1-carte-interactive">
    <area shape="rect" title="Sainte-Croix" coords="862,67,867,72" href="http://sainte-croix.forumgratuit.org/h1-carte-interactive">
    <area shape="rect" title="Collense" coords="555,239,560,244" href="http://sainte-croix.forumgratuit.org/h1-carte-interactive">
    <area shape="rect" title="Basses-mines" coords="506,77,511,82" href="http://sainte-croix.forumgratuit.org/h1-carte-interactive">
    <area shape="rect" title="Les-Forges" coords="808,371,813,376" href="http://sainte-croix.forumgratuit.org/h1-carte-interactive">
    <area shape="rect" title="Espéride" coords="208,279,213,284" href="http://sainte-croix.forumgratuit.org/h1-carte-interactive">
    <area shape="rect" title="La-Tisserie" coords="312,400,317,405" href="http://sainte-croix.forumgratuit.org/h1-carte-interactive">
    <area shape="rect" title="Les-Scieries" coords="362,304,367,309" href="http://sainte-croix.forumgratuit.org/h1-carte-interactive">
    <area shape="rect" title="Haut-Marche" coords="385,954,390,959" href="http://sainte-croix.forumgratuit.org/h1-carte-interactive">
    <area shape="rect" title="Auberge du pendu" coords="261,598,266,603" href="http://sainte-croix.forumgratuit.org/h1-carte-interactive">
    <area shape="rect" title="Les chantiers navals" coords="498,744,503,749" href="http://sainte-croix.forumgratuit.org/h1-carte-interactive">
    <area shape="rect" title="Puits-du-Bouc" coords="100,520,105,525" href="http://sainte-croix.forumgratuit.org/h1-carte-interactive">
    <area shape="rect" title="Pas-du-Levant" coords="991,740,996,745" href="http://sainte-croix.forumgratuit.org/h1-carte-interactive">
    <area shape="rect" title="Hospital" coords="924,512,929,517" href="http://sainte-croix.forumgratuit.org/h1-carte-interactive">
    <area shape="rect" title="Baie-des-geoles" coords="623,66,628,71" href="http://sainte-croix.forumgratuit.org/h1-carte-interactive">
    <area shape="rect" title="Cap Nord" coords="329,788,334,793" href="http://sainte-croix.forumgratuit.org/h1-carte-interactive">
    <area shape="rect" title="Les-Chenaux" coords="862,277,867,282" href="http://sainte-croix.forumgratuit.org/h1-carte-interactive">
    <area shape="poly" title="L'île des pirates" coords="201, 17, 175, 37, 175, 52, 181, 59, 197, 69, 222, 71, 247, 63, 253, 56, 252, 47, 230, 22, 222, 17, 201, 17" href="http://sainte-croix.forumgratuit.org/h1-carte-interactive">
    <area shape="poly" title="L'île du Lézard" coords="321, 358, 283, 394, 268, 449, 283, 449, 338, 392, 321, 358" href="http://sainte-croix.forumgratuit.org/h1-carte-interactive">
    <area shape="poly" title="Comptoir des boucaniers" coords="49, 495, 17, 518, 17, 543, 119, 529, 180, 496, 176, 485, 135, 490, 96, 510, 49, 495" href="http://sainte-croix.forumgratuit.org/h1-carte-interactive">
    <area shape="poly" title="Royaume des Terres du Levant" coords="790, 0, 757, 32, 861, 94, 808, 111, 849, 220, 782, 244, 747, 350, 810, 382, 1003, 406, 940, 597, 983, 746, 1024, 750, 1024, 0, 790, 0"
    href="http://sainte-croix.forumgratuit.org/h1-carte-interactive">
    <area shape="poly" title="Royaume du triangle" coords="328, 786, 266, 886, 238, 967, 411, 966, 415, 948, 381, 862, 328, 786" href="http://sainte-croix.forumgratuit.org/h1-carte-interactive">
    <area shape="poly" title="Royaume des Espérides" coords="164, 204, 109, 212, 59, 251, 36, 294, 33, 325, 42, 338, 63, 358, 160, 403, 214, 332, 200, 225, 164, 204" href="http://sainte-croix.forumgratuit.org/h1-carte-interactive">
    <area shape="poly" title="Les Provinces-Unies" coords="485, 42, 403, 133, 311, 273, 309, 291, 399, 368, 461, 277, 565, 311, 713, 169, 692, 84, 647, 57, 525, 31, 497, 33, 485, 42" href="http://sainte-croix.forumgratuit.org/h1-carte-interactive">
    <area shape="poly" title="Royaume des grandes Terres" coords="677, 356, 504, 452, 465, 486, 452, 505, 445, 621, 506, 787, 598, 875, 683, 904, 798, 918, 874, 917, 917, 897, 928, 854, 928, 454, 915, 430, 863, 399, 718, 361, 677, 356" href="http://sainte-croix.forumgratuit.org/h1-carte-interactive">
    <area shape="poly" title="Les îles désertes" coords="244, 550, 196, 573, 184, 601, 183, 625, 198, 655, 230, 680, 283, 692, 291, 689, 351, 636, 344, 553, 244, 550" href="http://sainte-croix.forumgratuit.org/h1-carte-interactive">
    <area shape="poly" title="L'île de la Flibuste" coords="139, 741, 109, 756, 94, 769, 49, 773, 33, 784, 33, 808, 37, 811, 100, 824, 130, 825, 182, 799, 189, 786, 182, 774, 148, 745, 139, 741" </map>

    <object type="application/x-shockwave-flash" data="http://flash-mp3-player.net/medias/player_mp3_maxi.swf" width="100" height="3">
        <param name="movie" value="http://flash-mp3-player.net/medias/player_mp3_maxi.swf" />
        <param name="bgcolor" value="#000000" />
        <param name="FlashVars" value="mp3=http://www.light2art.de/MP3/Meeresbrandung-auf-Felsen.mp3&amp;autoplay=1&amp;volume=125" />
    </object></center>
avatar

Madeal
Nouveau membre

Messages : 11
Inscrit(e) le : 03/09/2011

http://legendsofdreams.forumsactifs.com/
Madeal a été remercié(e) par l'auteur de ce sujet.

Résolu Re: Centrer une image au sein d'une page html

Message par emc2 Mer 25 Juil 2012 - 15:01

Désolé, ça ne fonctionne pas.
Le bandeau donnant la date de la dernière maj et bien centrée, mais la carte reste à gauche et le lecteur mp3 également. Sad

Par contre votre proposition m'a donné la solution. j'ai mis les balise center et /center autour de chaque éléments et cela fonctionne bien.
Code:
<center><table width="88%" cellpadding="3" cellspacing="1" border="0" bgcolor="#000000">
        <tr>
              <td width=10 style="color:white" bgcolor="#b8b885">&gt;</td>
              <td style="color="#b8b885";font-weight:bold" bgcolor="#b8b885">CARTE DU JEU derniere maj 25-07-12</td>
        </tr>
    </table></center>

    <center><img usemap="#page_d_accueil" src="http://www.archive-host.com/files/1676537/971e6b8110bd71cb5648125842a5ee4cef93a149/1024_villes.png" width="1024" height="1024" border="0"></center>
    <map name="page_d_accueil">
    <area shape="rect" title="Kanayé" coords="204,63,209,68" href="http://sainte-croix.forumgratuit.org/h1-carte-interactive">
    <area shape="rect" title="Port-Royal" coords="537,541,542,546" href="http://sainte-croix.forumgratuit.org/h1-carte-interactive">
    <area shape="rect" title="Sainte-Croix" coords="862,67,867,72" href="http://sainte-croix.forumgratuit.org/h1-carte-interactive">
    <area shape="rect" title="Collense" coords="555,239,560,244" href="http://sainte-croix.forumgratuit.org/h1-carte-interactive">
    <area shape="rect" title="Basses-mines" coords="506,77,511,82" href="http://sainte-croix.forumgratuit.org/h1-carte-interactive">
    <area shape="rect" title="Les-Forges" coords="808,371,813,376" href="http://sainte-croix.forumgratuit.org/h1-carte-interactive">
    <area shape="rect" title="Espéride" coords="208,279,213,284" href="http://sainte-croix.forumgratuit.org/h1-carte-interactive">
    <area shape="rect" title="La-Tisserie" coords="312,400,317,405" href="http://sainte-croix.forumgratuit.org/h1-carte-interactive">
    <area shape="rect" title="Les-Scieries" coords="362,304,367,309" href="http://sainte-croix.forumgratuit.org/h1-carte-interactive">
    <area shape="rect" title="Haut-Marche" coords="385,954,390,959" href="http://sainte-croix.forumgratuit.org/h1-carte-interactive">
    <area shape="rect" title="Auberge du pendu" coords="261,598,266,603" href="http://sainte-croix.forumgratuit.org/h1-carte-interactive">
    <area shape="rect" title="Les chantiers navals" coords="498,744,503,749" href="http://sainte-croix.forumgratuit.org/h1-carte-interactive">
    <area shape="rect" title="Puits-du-Bouc" coords="100,520,105,525" href="http://sainte-croix.forumgratuit.org/h1-carte-interactive">
    <area shape="rect" title="Pas-du-Levant" coords="991,740,996,745" href="http://sainte-croix.forumgratuit.org/h1-carte-interactive">
    <area shape="rect" title="Hospital" coords="924,512,929,517" href="http://sainte-croix.forumgratuit.org/h1-carte-interactive">
    <area shape="rect" title="Baie-des-geoles" coords="623,66,628,71" href="http://sainte-croix.forumgratuit.org/h1-carte-interactive">
    <area shape="rect" title="Cap Nord" coords="329,788,334,793" href="http://sainte-croix.forumgratuit.org/h1-carte-interactive">
    <area shape="rect" title="Les-Chenaux" coords="862,277,867,282" href="http://sainte-croix.forumgratuit.org/h1-carte-interactive">
    <area shape="poly" title="L'île des pirates" coords="201, 17, 175, 37, 175, 52, 181, 59, 197, 69, 222, 71, 247, 63, 253, 56, 252, 47, 230, 22, 222, 17, 201, 17" href="http://sainte-croix.forumgratuit.org/h1-carte-interactive">
    <area shape="poly" title="L'île du Lézard" coords="321, 358, 283, 394, 268, 449, 283, 449, 338, 392, 321, 358" href="http://sainte-croix.forumgratuit.org/h1-carte-interactive">
    <area shape="poly" title="Comptoir des boucaniers" coords="49, 495, 17, 518, 17, 543, 119, 529, 180, 496, 176, 485, 135, 490, 96, 510, 49, 495" href="http://sainte-croix.forumgratuit.org/h1-carte-interactive">
    <area shape="poly" title="Royaume des Terres du Levant" coords="790, 0, 757, 32, 861, 94, 808, 111, 849, 220, 782, 244, 747, 350, 810, 382, 1003, 406, 940, 597, 983, 746, 1024, 750, 1024, 0, 790, 0"
    href="http://sainte-croix.forumgratuit.org/h1-carte-interactive">
    <area shape="poly" title="Royaume du triangle" coords="328, 786, 266, 886, 238, 967, 411, 966, 415, 948, 381, 862, 328, 786" href="http://sainte-croix.forumgratuit.org/h1-carte-interactive">
    <area shape="poly" title="Royaume des Espérides" coords="164, 204, 109, 212, 59, 251, 36, 294, 33, 325, 42, 338, 63, 358, 160, 403, 214, 332, 200, 225, 164, 204" href="http://sainte-croix.forumgratuit.org/h1-carte-interactive">
    <area shape="poly" title="Les Provinces-Unies" coords="485, 42, 403, 133, 311, 273, 309, 291, 399, 368, 461, 277, 565, 311, 713, 169, 692, 84, 647, 57, 525, 31, 497, 33, 485, 42" href="http://sainte-croix.forumgratuit.org/h1-carte-interactive">
    <area shape="poly" title="Royaume des grandes Terres" coords="677, 356, 504, 452, 465, 486, 452, 505, 445, 621, 506, 787, 598, 875, 683, 904, 798, 918, 874, 917, 917, 897, 928, 854, 928, 454, 915, 430, 863, 399, 718, 361, 677, 356" href="http://sainte-croix.forumgratuit.org/h1-carte-interactive">
    <area shape="poly" title="Les îles désertes" coords="244, 550, 196, 573, 184, 601, 183, 625, 198, 655, 230, 680, 283, 692, 291, 689, 351, 636, 344, 553, 244, 550" href="http://sainte-croix.forumgratuit.org/h1-carte-interactive">
    <area shape="poly" title="L'île de la Flibuste" coords="139, 741, 109, 756, 94, 769, 49, 773, 33, 784, 33, 808, 37, 811, 100, 824, 130, 825, 182, 799, 189, 786, 182, 774, 148, 745, 139, 741" </map>

  <center> <object type="application/x-shockwave-flash" data="http://flash-mp3-player.net/medias/player_mp3_maxi.swf" width="100" height="3">
        <param name="movie" value="http://flash-mp3-player.net/medias/player_mp3_maxi.swf" />
        <param name="bgcolor" value="#000000" />
        <param name="FlashVars" value="mp3=http://www.light2art.de/MP3/Meeresbrandung-auf-Felsen.mp3&amp;autoplay=1&amp;volume=125" />
    </object></center>
emc2

emc2
*****

Messages : 555
Inscrit(e) le : 30/09/2011

http://sainte-croix.forumgratuit.org/
emc2 a été remercié(e) par l'auteur de ce sujet.

Résolu Re: Centrer une image au sein d'une page html

Message par Madeal Mer 25 Juil 2012 - 16:23


Contente pour vous alors. (:

Cordialement.
avatar

Madeal
Nouveau membre

Messages : 11
Inscrit(e) le : 03/09/2011

http://legendsofdreams.forumsactifs.com/
Madeal a été remercié(e) par l'auteur de ce sujet.

Voir le sujet précédent Voir le sujet suivant Revenir en haut

- Sujets similaires

Permission de ce forum:
Vous ne pouvez pas répondre aux sujets dans ce forum