Probleme hauteur tableau

Bonjour,

Voila 'ai crée un tableau d'une longeur de 100px et je voudrais une hauteur de 4px, mais e n'y arrive pas, la hauteau se bloque a 19px, impossible d'aller plus loin...

J'utilise dreamweaver

Merci
Configuration: Windows XP
Internet Explorer 7.0

4 réponses

  1. Contributeur
    Bonjour,

    Je ne vois pas trop à quoi ça peut servir, mais pour faire ce genre de chose, tu n'as pas besoin de tableau.
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <html>
    <head>
    <title>Un titre</title>
        <meta http-equiv="Content-type" content="text/html; charset=utf-8">
        <style type="text/css">
        html, body {
          margin: 0;
          padding: 0;
          text-align: center;
          background-color: #932600;
          color : #344979;
          }
        #conteneur {
          position: relative;
          margin: 0 auto;
          width: 760px;
          border : 1px solid #fff;
          background-color: #ffd;
          font-family: 'Trebuchet MS', Verdana, sans-serif;
          }
        #div100x4 {
           margin : 100px auto;
           width : 100px;
           height : 4px;
           line-height : 4px;
           background-color : #0ff;
           font-size : 1.2em;
           font-weight : bold;
          }
        </style>
    </head>
    <body>
      <div id="conteneur">
        <div id="div100x4">100 x 4</div>
      </div>
    </body>
    </html>

    ++
    En HTML, on parle plutôt de largeur et de hauteur.

    --
    0
    1. C'est pour mettre une image de fond de 4px de hauteur lol ...
      La je comprend pas tout avec ce que tu as fais :s ..
      0
      1. Contributeur
        Bon, alors montre-nous comment tu t'y prends.

        Ou essaye comme ça
        <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
        <html xmlns="http://www.w3.org/1999/xhtml" lang="fr">
          <head>
            <meta content="text/html; charset=UTF-8" http-equiv="content-type" />
            <title>table avec <td> de 100px par 4px</title>
          </head>
        
          <body style="margin:0;padding:0;">
            <table style="width:500px; background-color:#ddd;" border="0" cellpadding="0" cellspacing="0">
              <tbody>
                <tr>
                  <td style="background-color:#dcc; width:200px; height:4px;">
                  </td>
                  <td style="background:#fff url(bg4x4.gif) 0 0 ; width:100px; height:4px;">
                  </td>
                  <td style="background-color:#ccd; width:200px; height:4px;">
                  </td>
                </tr>
              </tbody>
            </table>
            <br />
          </body>
        </html>
        --
        0
        1. Salut, le problème vient de DW qui insère automatique un caractère vide entre les balises TD :
          <td>&nbsp;</td>
          -> du coup pour DW ta ligne contient un caractère et ne peut être réduite à une hauteur inférieur à ce dernier.

          La solution : supprime le caractère suivant entre les TD =>>
          &nbsp;

          Tu pourras alors donner la hauteur que tu souhaites
          0