Probleme hauteur tableau

Fermé
Sangohan62 Messages postés 123 Date d'inscription dimanche 21 mai 2006 Statut Membre Dernière intervention 22 mars 2011 - 11 janv. 2008 à 22:07
ferris Messages postés 84 Date d'inscription samedi 12 janvier 2008 Statut Membre Dernière intervention 20 septembre 2018 - 12 janv. 2008 à 10:41
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
A voir également:

4 réponses

Gihef Messages postés 5150 Date d'inscription mercredi 20 juillet 2005 Statut Contributeur Dernière intervention 20 février 2023 2 779
11 janv. 2008 à 23:13
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
Sangohan62 Messages postés 123 Date d'inscription dimanche 21 mai 2006 Statut Membre Dernière intervention 22 mars 2011 6
11 janv. 2008 à 23:35
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
Gihef Messages postés 5150 Date d'inscription mercredi 20 juillet 2005 Statut Contributeur Dernière intervention 20 février 2023 2 779
12 janv. 2008 à 00:35
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
ferris Messages postés 84 Date d'inscription samedi 12 janvier 2008 Statut Membre Dernière intervention 20 septembre 2018 14
12 janv. 2008 à 10:41
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