Alignement site

Bonjour,
je voudrai savoir un scritp html qui permet de centrer un site car mon site et pas centrer
Configuration: Windows Vista
Firefox 2.0.0.13

17 réponses

  1. utilise les balises html <center> </center>
    0
    1. Utilise les balises html
      <center> </center>
      ;-)
      0
      1. Bonjour,
        tu peut nous faire montrer ton code.
        0
        1. centrer comment??

          tu met un style Css sur ton body ou tu definit la largeur (width) et tu met les marge gauche et droite en auto (margin-left:auto; margin-right:auto;)
          0
          1. en css:

            body{
            width: 650px;
            margin-left:auto;
            margin-right:auto;
            }
            0
            1. Contributeur
              Salut,
              Peux tu faire un post de ton script?
              0
              1. Contributeur
                Salut,
                Peux tu faire un Post de ton Code ?
                Pense à sélectionner "conserver la mise en forme du texte sélectionné"
                0
                1. <div align="<?php
                  // ********************************************************** \\
                  // ** Template st_nervosia - Nuked-KlaN 1.7 ( Theme Gamers ** \\
                  // ** ** \\
                  // ** Design by Huma & PHP by Nowy ** \\
                  // ** Thème valide XHTML 1.0 Strict & CSS ** \\
                  // ** ** \\
                  // ** http://www.studio-storm.com ** \\
                  // ** https://nuked-klan.org/ ** \\
                  // *********************************************************** \\
                  function top()
                  {
                  global $bgcolor1, $bgcolor2, $bgcolor3, $bgcolor4, $nuked, $file, $page, $user;

                  echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n"
                  . "<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"fr\"><head>\n"
                  . "<meta name=\"keywords\" content=\"" . $nuked['keyword'] . "\" />\n"
                  . "<meta name=\"Description\" content=\"" . $nuked['description'] . "\" />\n"
                  . "<title>" . $nuked['name'] . " - " . $nuked['slogan'] . "</title>\n";
                  ?>
                  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
                  <meta http-equiv="content-style-type" content="text/css" />
                  <link rel="shortcut icon" type="image/x-icon" href="images/favicon.ico" />
                  <link rel="icon" type="image/x-icon" href="images/favicon.ico" />
                  <link title="style" type="text/css" rel="stylesheet" href="themes/st_nervosia/style.css" />
                  <script type="text/javascript" src="themes/st_nervosia/flash.js"></script>
                  </head>
                  <body>
                  <table style="width:1200px; margin-left:auto; margin-right:auto;" border="0" cellspacing="0" cellpadding="0">
                  <tr style="height:100%;">
                  <td style="width:150px; background-image:url(themes/st_nervosia/images/bars/left.jpg); vertical-align:top;">
                  <img class="image" src="themes/st_nervosia/images/bars/top_left.jpg" alt="" width="150" height="385" />
                  </td>
                  <td style="width:900px; vertical-align:top;">
                  <table style="width:900px;" border="0" cellspacing="0" cellpadding="0">
                  <tr style="height:372px;">
                  <td style="width:900px; vertical-align:top;">
                  <table style="width:900px; height:284px" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                  <?php echo '
                  <td style="width:900px; vertical-align:top;">
                  <script type="text/javascript">
                  show_flash("900", "284", "themes/st_nervosia/images/header/header_navi.swf", "", "team=' . text2flash($nuked['name']) . '");
                  </script>
                  </td>'; ?>
                  </tr>
                  </table>
                  <table border="0" cellspacing="0" cellpadding="0" >
                  <tr>
                  <td style="width:270px;height:88px;vertical-align:top;">
                  <?php include("themes/st_nervosia/blocks/block_posts.php"); ?>
                  </td>
                  <td style="width:360px;height:88px;vertical-align:top;">
                  <?php include("themes/st_nervosia/blocks/block_user.php"); ?>
                  </td>
                  <td style="width:270px;height:88px;vertical-align:top;">
                  <?php include("themes/st_nervosia/blocks/block_wars.php"); ?>
                  </td>
                  </tr>
                  </table>
                  <table style="width:900px; height:13px" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                  <td style="width:900px;height:13px;background-image:url(themes/st_nervosia/images/header/unik_under.jpg);vertical-align:top;">
                  </tr>
                  </table>
                  </td>
                  </tr>
                  <tr style="height:100%;">
                  <td style="width:900px; vertical-align:top;">
                  <table style="width:900px;" border="0" cellspacing="0" cellpadding="0">
                  <tr style="height:100%;">
                  <td style="width:188px; background-image:url(themes/st_nervosia/images/left/bg.jpg); vertical-align:top;">
                  <?php
                  if ($file != "Forum" && $page != "forum")
                  {
                  get_blok('gauche');
                  }
                  ?>
                  </td>
                  <?php
                  if($file == Forum)
                  {
                  echo "<td style=\"width:900px; background-image:url(themes/st_nervosia/images/forum/bg.jpg); vertical-align:top;\">";
                  }
                  else if($file == News)
                  {
                  echo "<td style=\"width:522px; background-image:url(themes/st_nervosia/images/news/bg.jpg); vertical-align:top;\">";
                  }
                  else
                  {
                  echo "<td style=\"width:712px; background-image:url(themes/st_nervosia/images/page/bg.jpg); vertical-align:top;\">";
                  }
                  {
                  get_blok('centre');
                  }
                  }

                  function footer()
                  {
                  global $bgcolor1, $bgcolor2, $bgcolor3, $bgcolor4, $nuked, $file, $page, $user;

                  if ($file != "Forum" && $page != "forum")
                  {
                  get_blok('bas');
                  }
                  ?>
                  <?php
                  if ($file == News)
                  {
                  echo"</td>
                  <td style=\"width:190px; background-image:url(themes/st_nervosia/images/right/bg.jpg); vertical-align:top;\">";
                  {
                  get_blok('droite');
                  }
                  }
                  ?>
                  </td>
                  </tr>
                  </table>
                  </td>
                  </tr>
                  </table>
                  <table style="width:900px; height:35px" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                  <?php
                  echo '
                  <td style="width:900px; vertical-align:top;">
                  <script type="text/javascript">
                  show_flash("900", "35", "themes/st_nervosia/images/footer/footer_cr.swf", "", "message=' . text2flash($nuked['footmessage']) . '");
                  </script>
                  </td>'; ?>
                  </tr>
                  </table>
                  </td>
                  <td style="width:150px; background-image:url(themes/st_nervosia/images/bars/right.jpg); vertical-align:top;">
                  <img class="image" src="themes/st_nervosia/images/bars/top_right.jpg" alt="" width="150" height="385" /></td>
                  </tr>
                  </table>
                  </body>
                  </html>
                  <?php
                  exit();
                  }

                  function news($data)
                  {
                  global $bgcolor1, $bgcolor2, $bgcolor3, $bgcolor4, $nuked;

                  $posted = "Postée par <a href=\"index.php?file=Members&op=detail&autor=" . urlencode($data['auteur']) . "\">" . $data['auteur'] . "</a> le ". $data['date'];

                  if ($data['nb_comment'] > 1) $pluriel = "s";
                  else $pluriel = "";

                  $comment = "<a href=\"index.php?file=News&op=index_comment&news_id=" . $data['id'] . "\">" . $data['nb_comment'] . " Commentaire" . $pluriel . "</a>";

                  ?>
                  <table style="width:522px; height:40px; background-image:url(themes/st_nervosia/images/news/titre.jpg);" border="0" cellspacing="0" cellpadding="0">
                  <tr style="height:9px;">
                  <td style="width:522px"></td>
                  </tr>
                  <tr style="height:15px;">
                  <td style="color:#728694;width:522px; text-align:center;"><b><?php echo $data['titre']; ?></b></td>
                  </tr>
                  <tr style="height:16px;">
                  <td style="width:522px"></td>
                  </tr>
                  </table>
                  <table style="width:522px;background-image:url(themes/st_nervosia/images/news/bg.jpg);" border="0" cellspacing="0" cellpadding="0">
                  <tr style="height:100%;">
                  <td style="width:5px;"></td>
                  <td style="width:513px;">
                  <?php echo $data['image']; ?><?php echo $data['texte']; ?>
                  <br /><br />
                  </td>
                  <td style="width:5px;"></td>
                  </tr>
                  </table>
                  <table style="width:522px; height:37px;background-image:url(themes/st_nervosia/images/news/bot.jpg)" border="0" cellspacing="0" cellpadding="0">
                  <tr style="height:12px;">
                  <td></td>
                  </tr>
                  <tr style="height:25px;">
                  <td class="Info" style="text-align:center;width:522px; "><?php echo $posted; ?> - <?php echo $comment; ?></td>
                  </tr>
                  </table>
                  <?php
                  }

                  function block_gauche($block)
                  {
                  global $bgcolor1, $bgcolor2, $bgcolor3, $bgcolor4, $nuked;
                  ?>
                  <table style="width:188px; height:40px; background-image:url(themes/st_nervosia/images/left/titre.jpg);" border="0" cellspacing="0" cellpadding="0">
                  <tr style="height:9px;">
                  <td style="width:188px"></td>
                  </tr>
                  <tr style="height:15px;">
                  <td style="width:188px; text-align:left;padding-left:91px"><b><?php echo $block['titre']; ?></b></td>
                  </tr>
                  <tr style="height:16px;">
                  <td style="width:188px"></td>
                  </tr>
                  </table>
                  <table style="width:188px; background-image:url(themes/st_nervosia/images/left/bg.jpg);" border="0" cellspacing="0" cellpadding="0">
                  <tr style="height:100%;">
                  <td style="width:3px;"></td>
                  <td style="width:182px;"><?php echo $block['content']; ?></td>
                  <td style="width:3px;"></td>
                  </tr>
                  </table>
                  <table style="width:188px; height:33px; " border="0" cellspacing="0" cellpadding="0">
                  <tr style="height:33px;">
                  <td style="text-align:center;width:187px; background-image:url(themes/st_nervosia/images/left/bot.jpg);"></td>
                  </tr>
                  </table>
                  <?php
                  }

                  function block_droite($block)
                  {
                  global $bgcolor1, $bgcolor2, $bgcolor3, $bgcolor4, $nuked;
                  ?>
                  <table style="width:190px; height:40px; background-image:url(themes/st_nervosia/images/right/titre.jpg);" border="0" cellspacing="0" cellpadding="0">
                  <tr style="height:9px;">
                  <td style="width:190px"></td>
                  </tr>
                  <tr style="height:15px;">
                  <td style="width:190px; text-align:left;padding-left:20px"><b><?php echo $block['titre']; ?></b></td>
                  </tr>
                  <tr style="height:16px;">
                  <td style="width:190px"></td>
                  </tr>
                  </table>
                  <table style="width:190px; background-image:url(themes/st_nervosia/images/right/bg.jpg);" border="0" cellspacing="0" cellpadding="0">
                  <tr style="height:100%;">
                  <td style="width:3px;"></td>
                  <td style="width:184px;"><?php echo $block['content']; ?></td>
                  <td style="width:3px;"></td>
                  </tr>
                  </table>
                  <table style="width:190px; height:33px; " border="0" cellspacing="0" cellpadding="0">
                  <tr style="height:33px;">
                  <td style="text-align:center;width:187px; background-image:url(themes/st_nervosia/images/right/bot.jpg);"></td>
                  </tr>
                  </table>
                  <?php
                  }

                  function block_centre($block)
                  {
                  global $bgcolor1, $bgcolor2, $bgcolor3, $bgcolor4, $nuked, $file, $page;

                  if ($file == $nuked['index_site'] && $page == "")
                  {
                  ?>
                  <table style="width:522px; height:40px; background-image:url(themes/st_nervosia/images/page/block.jpg);" border="0" cellspacing="0" cellpadding="0">
                  <tr style="height:9px;">
                  <td style="width:522px"></td>
                  </tr>
                  <tr style="height:15px;">
                  <td style="color:#728694;width:522px; text-align:center;"><b><?php echo $block['titre']; ?></b></td>
                  </tr>
                  <tr style="height:16px;">
                  <td style="width:522px"></td>
                  </tr>
                  </table>
                  <table style="width:522px;background-image:url(themes/st_nervosia/images/news/bg.jpg);" border="0" cellspacing="0" cellpadding="0">
                  <tr style="height:100%;">
                  <td style="width:5px;"></td>
                  <td style="width:512px;"><?php echo $block['content']; ?></td>
                  <td style="width:5px;"></td>
                  </tr>
                  </table>
                  <table style="width:522px; height:37px;background-image:url(themes/st_nervosia/images/news/bot.jpg)" border="0" cellspacing="0" cellpadding="0">
                  <tr style="height:12px;">
                  <td></td>
                  </tr>
                  <tr style="height:25px;">
                  <td class="Info" style="text-align:center;width:522px"></td>
                  </tr>
                  </table>
                  <?php
                  }
                  else
                  {
                  ?>
                  <br />
                  <table style="width:712px; height:40px; background-image:url(themes/st_nervosia/images/page/titre.jpg);" border="0" cellspacing="0" cellpadding="0">
                  <tr style="height:9px;">
                  <td style="width:522px"></td>
                  </tr>
                  <tr style="height:15px;">
                  <td style="color:#728694;width:712px; text-align:center;"><b><?php echo $block['titre']; ?></b></td>
                  </tr>
                  <tr style="height:16px;">
                  <td style="width:522px"></td>
                  </tr>
                  </table>
                  <table style="width:712px; background-image:url(themes/st_nervosia/images/page/bg.jpg);" border="0" cellspacing="0" cellpadding="0">
                  <tr style="height:100%;">
                  <td style="width:5px;"></td>
                  <td style="width:702px;"><?php echo $block['content']; ?></td>
                  <td style="width:5px;"></td>
                  </tr>
                  </table>
                  <?php
                  }
                  }

                  function block_bas($block)
                  {
                  global $bgcolor1, $bgcolor2, $bgcolor3, $bgcolor4, $nuked, $file, $page;

                  if ($file == $nuked['index_site'] && $page == "")
                  {
                  ?>
                  <table style="width:522px; height:40px; background-image:url(themes/st_nervosia/images/page/block.jpg);" border="0" cellspacing="0" cellpadding="0">
                  <tr style="height:9px;">
                  <td style="width:522px"></td>
                  </tr>
                  <tr style="height:15px;">
                  <td style="color:#728694;width:522px; text-align:center;"><b><?php echo $block['titre']; ?></b></td>
                  </tr>
                  <tr style="height:16px;">
                  <td style="width:522px"></td>
                  </tr>
                  </table>
                  <table style="width:522px;background-image:url(themes/st_nervosia/images/news/bg.jpg);" border="0" cellspacing="0" cellpadding="0">
                  <tr style="height:100%;">
                  <td style="width:5px;"></td>
                  <td style="width:512px;"><?php echo $block['content']; ?></td>
                  <td style="width:5px;"></td>
                  </tr>
                  </table>
                  <table style="width:522px; height:37px;background-image:url(themes/st_nervosia/images/news/bot.jpg)" border="0" cellspacing="0" cellpadding="0">
                  <tr style="height:12px;">
                  <td></td>
                  </tr>
                  <tr style="height:25px;">
                  <td class="Info" style="text-align:center;width:522px"></td>
                  </tr>
                  </table>
                  <?php
                  }
                  else
                  {
                  ?>
                  <table style="width:712px; height:40px; background-image:url(themes/st_nervosia/images/page/titre.jpg);" border="0" cellspacing="0" cellpadding="0">
                  <tr style="height:9px;">
                  <td style="width:522px"></td>
                  </tr>
                  <tr style="height:15px;">
                  <td style="color:#728694;width:712px; text-align:center;"><b><?php echo $block['titre']; ?></b></td>
                  </tr>
                  <tr style="height:16px;">
                  <td style="width:522px"></td>
                  </tr>
                  </table>
                  <table style="width:712px; background-image:url(themes/st_nervosia/images/page/bg.jpg);" border="0" cellspacing="0" cellpadding="0">
                  <tr style="height:100%;">
                  <td style="width:5px;"></td>
                  <td style="width:702px;"><?php echo $block['content']; ?></td>
                  <td style="width:5px;"></td>
                  </tr>
                  </table>
                  <?php
                  }
                  }

                  function opentable()
                  {
                  global $bgcolor1, $bgcolor2, $bgcolor3, $bgcolor4, $nuked, $file, $page, $admin;

                  if ($file != "Forum" && $page != "forum")
                  {
                  ?>
                  <table style="width:712px; height:40px; background-image:url(themes/st_nervosia/images/page/titre.jpg);" border="0" cellspacing="0" cellpadding="0">
                  <tr style="height:9px;">
                  <td style="width:522px"></td>
                  </tr>
                  <tr style="height:15px;">
                  <td style="color:#728694;width:712px; text-align:center;"><b><?php echo $file; ?></b></td>
                  </tr>
                  <tr style="height:16px;">
                  <td style="width:522px"></td>
                  </tr>
                  </table>
                  <table style="width:712px; background-image:url(themes/st_nervosia/images/page/bg.jpg);" border="0" cellspacing="0" cellpadding="0">
                  <tr style="height:100%;">
                  <td style="width:5px;"></td>
                  <td style="width:702px;">
                  <?php
                  }

                  else
                  {
                  ?>
                  <table style="width:900px; height:40px; background-image:url(themes/st_nervosia/images/forum/titre.jpg);" border="0" cellspacing="0" cellpadding="0">
                  <tr style="height:40px;">
                  <td style="width:900px; text-align:center;"></td>
                  </tr>
                  </table>
                  <br />
                  <table style="width:900px;" border="0" cellspacing="0" cellpadding="0">
                  <tr style="height:100%;">
                  <td style="width:5px;"></td>
                  <td style="width:900px;">
                  <?php
                  }

                  }

                  function closetable()
                  {
                  global $bgcolor1, $bgcolor2, $bgcolor3, $bgcolor4, $nuked, $file, $page;

                  if ($file != "Admin" && $page != "admin" && $file != "User" && $page != "user" && $file != "Forum" && $page != "forum")
                  {
                  ?>
                  </td>
                  <td style="width:5px;"></td>
                  </tr>
                  </table>
                  <?php
                  }

                  else
                  {
                  ?>
                  </td>
                  <td style="width:5px;"></td>
                  </tr>
                  </table>
                  <?php
                  }
                  }

                  function text2flash($str)
                  {
                  $a = "ÀÁÂÃÄÅàáâãäåÒÓÔÕÖØòóôõöøÈÉÊËèéêëÇçÌÍÎÏìíîïÙÚÛÜùúûüÿÑñ@";
                  $b = "AAAAAAaaaaaaOOOOOOooooooEEEEeeeeCcIIIIiiiiUUUUuuuuyNna";
                  $str = @html_entity_decode($str);
                  $str = strtr($str, $a, $b);
                  $str = str_replace('"', '%22', $str);
                  $str = str_replace("'", "%27", $str);

                  return($str);
                  }
                  ?>"ALIGN=TOP|BOTTOM|MIDDLE|LEFT|RIGHT>">un site</div><IMG SRC="
                  0
                  1. Contributeur
                    Essaye avec :
                    <div align="center">Ton Texte</div>
                    0
                    1. voila le site http://xtremecs.free.fr/index.php?file=News
                      0
                      1. Contributeur
                        Il est centré ton site...
                        ... 2 membres et les recrutements sont off =) ??
                        0
                        1. Contributeur
                          Ta barre du bas est en flash donc ça va être difficile (impossible) de l'enlever sans Adobe Flash CSx...
                          0
                          1. on peu pas reduire la taille du site pour que ya plus la barre ?
                            0
                            1. C'est un vieux thème sa ...
                              Met un des nouveaux

                              [i]concepteur de site web nuked-klan, webspell et full php, la qualité est assurée, vous pouvez trouver tout de tous les goûts, aussi vous avez un souci avec votre site ? Venez on est là pour vous aider./i

                              regarde ici :
                              http://www.studio-storm.com
                              0