IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

HTML Discussion :

Position d'un Tableau


Sujet :

HTML

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Membre actif
    Profil pro
    Inscrit en
    Août 2010
    Messages
    50
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Août 2010
    Messages : 50
    Par défaut Position d'un Tableau
    Bonjour
    je suis en train de faire un site en HTML
    et j'ai un tableau avec mon menu dedans mais j'aimerais qu'il soit toujours centre et en bas de mon image
    je pense a une position absolu mais je n'y arrive pas
    merci de m'aider.

    mon code est :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <TITLE>Wéb$@çhàe</TITLE>
    <style type="text/css">
    .body {
            background-image:url(ecran1.gif);
            background-repeat:no-repeat;
            background-position: center center;
            height: 600px;
            }
            .zoom {
    height:400px;
    margin:auto;
    }
    .zoom p {
    text-align:center;
    }
    .zoom img {
    width:55px;
    height:55px;
    }
    .zoom img:hover {
    width:90px;
    height:90px;
    }
    </style>
    </head>
     
    <body bgcolor="#000000">
    <div class="body" >
    <div class="zoom">
      <div align="center">
     
          <table width="795" border="0" align="center">
            <tr>
              <th width="52" scope="col">&nbsp;</th>
              <th width="113" height="94" scope="col"><img src="menu/accueil.gif"
             alt="accueil" /></th>
              <th width="114" scope="col"><img src="menu/profil.gif"
             alt="profil" /></th>
              <th width="115" scope="col"><img src="menu/cv.gif"
             alt="cv" /></th>
              <th width="113" scope="col"><img src="menu/presentation.gif"
             alt="presentation" /></th>
              <th width="90" scope="col"><img src="menu/liens.gif"
             alt="liens" /></th>
              <th width="103" scope="col"><img src="menu/contact.gif"
             alt="contact" /></th>
              <th width="61" scope="col">&nbsp;</th>
            </tr>
          </table>
        </div>
        <p>&nbsp;</p>
    </div>
    </div>
    </body>
    </html>

  2. #2
    Membre actif
    Profil pro
    Inscrit en
    Août 2010
    Messages
    50
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Août 2010
    Messages : 50
    Par défaut
    je viens de rajouté ca mais je sais pas si c'est bon

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <TITLE>Wéb$@çhàe</TITLE>
    <style type="text/css">
    .body {
            background-image:url(ecran1.gif);
            background-repeat:no-repeat;
            background-position: center center;
            height: 600px;
            }
            .zoom {
    height:400px;
    margin:auto;
    }
    .zoom p {
    text-align:center;
    }
    .zoom img {
    width:55px;
    height:55px;
    }
    .zoom img:hover {
    width:90px;
    height:90px;
    }
    </style>
    </head>
     
    <body bgcolor="#000000">
    <div class="body" >
    <div class="zoom">
     
      <DIV STYLE="position:absolute; top: 475px; left: 356px; width: 743px; height: 103px;"> 
          <table width="795" border="0" align="center">
            <tr>
              <th width="80" height="94" scope="col">&nbsp;</th>
              <th width="117" scope="col"><img src="menu/accueil.gif"
             alt="accueil" /></th>
              <th width="95" scope="col"><img src="menu/profil.gif"
             alt="profil" /></th>
              <th width="120" scope="col"><img src="menu/cv.gif"
             alt="cv" /></th>
              <th width="127" scope="col"><img src="menu/presentation.gif"
             alt="presentation" /></th>
              <th width="106" scope="col"><img src="menu/liens.gif"
             alt="liens" /></th>
              <th width="120" scope="col"><img src="menu/contact.gif"
             alt="contact" /></th>
            </tr>
          </table>
        </div>
      </DIV>
    </div>
    </body>
    </html>

  3. #3
    Membre éclairé
    Profil pro
    Inscrit en
    Décembre 2007
    Messages
    73
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Décembre 2007
    Messages : 73
    Par défaut
    Salut,

    dans un premier temps, essaye de garder une syntaxe cohérente.
    par exemple, si tu déclare un style <style style/>, ne met pas de style dans ton code html <body bgcolor=...>.
    ecrit ton html d'un coté et le style de l'autre. je te conseil l'utilisation d'une feuille de style (.css).

    beaucoup plus simple à corriger et à débug.

    pour ton histoire de centrage, avec ton code, chez moi le tableau est bien en "absolute", mais n'ayant pas les images, je ne vois pas le rendu et donc je ne sais pas si c'est bon. tu n'aurais pas une version en ligne ?

  4. #4
    Membre actif
    Profil pro
    Inscrit en
    Août 2010
    Messages
    50
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Août 2010
    Messages : 50
    Par défaut
    je me suis déjà fait un site en flash :

    mais je veux le refaire en html :

    si tu veux voir ce que cela fait en html :

    ce qui est bizarre c'est que sur mon dreamwever j'ai cette affichage :

    J'ai changé le css pour ma couleur de fond
    sur mon ordi le site s'affiche bien :

    sur un autre ordi j'ai cette affichage :

    et mon code :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <TITLE>Wéb$@çhà</TITLE>
    <style type="text/css">
    .body {
            background-image:url(ecran1.gif);
            background-repeat:no-repeat;
            background-position: center center;
            height: 600px;
            }
            .zoom {
    height:400px;
    margin:auto;
    }
    .zoom p {
    text-align:center;
    }
    .zoom img {
    width:55px;
    height:55px;
    }
    .zoom img:hover {
    width:90px;
    height:90px;
    }
    body {
            background-color: #000;
    }
    </style>
    </head>
    <div class="body" >
    <div class="zoom">
      <DIV STYLE="position:absolute; top: 463px; left: 515px; width: 611px; height: 103px;"> 
          <table width="795" border="0" align="center">
            <tr>
              <th width="80" height="94" scope="col"><img src="menu/accueil.gif"
             alt="accueil" /></th>
              <th width="87" scope="col"><img src="menu/profil.gif"
             alt="profil" /></th>
              <th width="80" scope="col"><img src="menu/cv.gif"
             alt="cv" /></th>
              <th width="84" scope="col"><img src="menu/presentation.gif"
             alt="presentation" /></th>
              <th width="83" scope="col"><img src="menu/liens.gif"
             alt="liens" /></th>
              <th width="107" scope="col"><img src="menu/contact.gif"
             alt="contact" /></th>
              <th width="244" scope="col">&nbsp;</th>
            </tr>
          </table>
        </div>
      </DIV>
    </div>
    </body>
    </html>
    merci

  5. #5
    Membre éclairé
    Profil pro
    Inscrit en
    Décembre 2007
    Messages
    73
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Décembre 2007
    Messages : 73
    Par défaut
    tu as fait exprès de supprimer
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    <body bgcolor="#000000">
    de ton code ?

    tu as définit un style pour ton body dans la feuille, c'est bien, mais laisse au minimum la balise

    je trouvais ton code un peu brouillon (ce n'est que mon avis), je comprends mieux, tu utilise dream

    il y a rarement une seule manière d'écrire une page.
    perso j'aurai fait un truc du genre pour la structure.
    je me suis basé sur ta version flash.

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    <body>
    <div id="centre">
      <div id="contenu">
      </div>
      <ul>
        <li>menu1</li>
        <li>menu2</>
      </ul>
      <div id="pied">
      </div>
    </div>
    </body>
    pour le style:
    - tu centre la div id="centre"
    - tu mets ton contenu dans la 2eme
    - tu applique un style "menu" à la balise ul
    - tu mets ton pied de page dans la 3eme div

    voila en gros. ca reste léger et simple.
    besoin que je te développe plus l'explication pour le style ?

  6. #6
    Membre actif
    Profil pro
    Inscrit en
    Août 2010
    Messages
    50
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Août 2010
    Messages : 50
    Par défaut
    dsl mais tu parles une autre langue pour moi dsl

Discussions similaires

  1. [MySQL] problème de position d'un tableau
    Par tawba dans le forum PHP & Base de données
    Réponses: 25
    Dernier message: 04/02/2009, 18h47
  2. Position dans un tableau.
    Par dahmane2007 dans le forum VB.NET
    Réponses: 5
    Dernier message: 24/09/2008, 19h29
  3. Réponses: 2
    Dernier message: 25/08/2008, 11h23
  4. Détermination d'une position dans un tableau
    Par oLie dans le forum Bibliothèque standard
    Réponses: 13
    Dernier message: 21/05/2008, 10h38
  5. Comment changer position d'un tableau ?
    Par pierreonxbox dans le forum Général JavaScript
    Réponses: 4
    Dernier message: 15/06/2006, 09h14

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo