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

JavaScript Discussion :

Lignes blanches avant mon tableau


Sujet :

JavaScript

  1. #1
    Membre à l'essai
    Profil pro
    Inscrit en
    Décembre 2004
    Messages
    20
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Décembre 2004
    Messages : 20
    Points : 19
    Points
    19
    Par défaut Lignes blanches avant mon tableau
    Bonjour,

    le code suivant:

    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
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
     
    <head>
    <script language="javascript">
    function display()
    {
    	var _text = '';
    	_text += '<table width="95%" align="center" cellspacing="0" cellpadding="2" style="background-color: #fff; border 1px solid #ccc;"><tr style="background-color: #fff;"><td>-</td></tr>';
    	_text += '<tr style="background-color: #eee;"><td>-</td></tr>';
    	_text += '<tr style="background-color: #fff;"><td>-</td></tr>';
    	_text += '<tr style="background-color: #eee;"><td>-</td></tr>';
    	_text += '<tr style="background-color: #fff;"><td>-</td></tr>';
    	_text += '<tr style="background-color: #eee;"><td>-</td></tr>';
    	_text += '<tr style="background-color: #fff;"><td>-</td></tr>';
    	_text += '<tr style="background-color: #eee;"><td>-</td></tr>';
    	_text += '<tr style="background-color: #fff;"><td>-</td></tr>';
    	_text += '<tr style="background-color: #eee;"><td>-</td></tr>';
    	_text += '<tr style="background-color: #fff;"><td>-</td></tr>';
    	_text += '<tr style="background-color: #eee;"><td>-</td></tr>';
    	_text += '<tr style="background-color: #fff;"><td>-</td></tr>';
    	_text += '<tr style="background-color: #eee;"><td>-</td></tr>';
    	_text += '<tr style="background-color: #fff;"><td>-</td></tr>';
    	_text += '<tr style="background-color: #eee;"><td>-</td></tr>';
    	_text += '<tr style="background-color: #fff;"><td>-</td></tr>';
    	_text += '<tr style="background-color: #eee;"><td>-</td></tr>';
    	_text += '<tr style="background-color: #fff;"><td>-</td></tr>';
    	_text += '<tr style="background-color: #eee;"><td>-</td></tr>';
    	_text += '<tr style="background-color: #fff;"><td>-</td></tr>';
    	_text += '<tr style="background-color: #eee;"><td>-</td></tr>';
    	_text += '<tr style="background-color: #fff;"><td>-</td></tr>';
    	_text += '</table>';
     
    	alert(_text);
    	document.getElementById('main').innerHTML = _text;
    }
    </script>
    </head>
    <body onload="display(); return(false);">
    <table width="260" align="left" cellpadding="0" cellspacing="0" style="background-color: #ffc;">
    <tr>
    	<td id="title" height="30" valign="middle" style="border-bottom: 1px solid #CCC; background-color: #800;">
    	</td>
    </tr>
    <tr>
    	<td valign="middle">
    	<div id='main' align="center" valign="middle" style="width: 260; height: 210; overflow: auto; scrollbar-face-color: rgb(128,0,0);">
    <!-- <table width="95%" align="center" cellspacing="0" cellpadding="2" style="background-color: #fff; border 1px solid #ccc;"><tr style="background-color: #fff;"><td>-</td></tr>
    <tr style="background-color: #eee;"><td>-</td></tr>
    <tr style="background-color: #fff;"><td>-</td></tr>
    <tr style="background-color: #eee;"><td>-</td></tr>
    <tr style="background-color: #fff;"><td>-</td></tr>
    <tr style="background-color: #eee;"><td>-</td></tr>
    <tr style="background-color: #fff;"><td>-</td></tr>
    <tr style="background-color: #eee;"><td>-</td></tr>
    <tr style="background-color: #fff;"><td>-</td></tr>
    <tr style="background-color: #eee;"><td>-</td></tr>
    <tr style="background-color: #fff;"><td>-</td></tr>
    <tr style="background-color: #eee;"><td>-</td></tr>
    <tr style="background-color: #fff;"><td>-</td></tr>
    <tr style="background-color: #eee;"><td>-</td></tr>
    <tr style="background-color: #fff;"><td>-</td></tr>
    <tr style="background-color: #eee;"><td>-</td></tr>
    <tr style="background-color: #fff;"><td>-</td></tr>
    <tr style="background-color: #eee;"><td>-</td></tr>
    <tr style="background-color: #fff;"><td>-</td></tr>
    <tr style="background-color: #eee;"><td>-</td></tr>
    <tr style="background-color: #fff;"><td>-</td></tr>
    <tr style="background-color: #eee;"><td>-</td></tr>
    <tr style="background-color: #fff;"><td>-</td></tr>
    </table> -->
    	</div>
    	</td>
    </tr>
    <tr>
    	<td id="bottom" height="20" valign="middle" style="border-top: 1px solid #CCC;">
    	</td>
    </tr>
    </table>
     
    </body>
    fait apparaître mon tableau (au moins dans IE) avec un espace blanc au-dessus, alors que quand je le mets directement dans le html (lignes commentées), il n'y a pas cet espace blanc.

    Apparemment, lorsqu'on met moins de lignes dans le tableau, cet espace disparaît.

    Quelqu'un aurait-il une idée ? Comment se débarrasser de cet effet indésirable ?

    Merci

    Jérôme

  2. #2
    Inactif  
    Avatar de Kerod
    Profil pro
    Inscrit en
    Septembre 2004
    Messages
    11 672
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Septembre 2004
    Messages : 11 672
    Points : 20 778
    Points
    20 778
    Par défaut
    Ca dépend de plusieurs paramètres dont tu ne parles pas.Il faudrait mettre le code qui montre son application sur la page web

Discussions similaires

  1. Réponses: 2
    Dernier message: 06/04/2011, 21h27
  2. [WD-2003] Comment éliminer des lignes inutiles avant un tableau
    Par CSR94 dans le forum VBA Word
    Réponses: 6
    Dernier message: 04/11/2010, 09h05
  3. Ligne blanche longeant mon fond d'écran HTML
    Par Kuchiki Byakuya dans le forum Balisage (X)HTML et validation W3C
    Réponses: 2
    Dernier message: 12/01/2007, 20h27
  4. Espace vide avant mon tableau HTML
    Par socooooool dans le forum Balisage (X)HTML et validation W3C
    Réponses: 14
    Dernier message: 11/08/2006, 17h58
  5. Éliminer les lignes blanches dans un tableau
    Par DenPro dans le forum Balisage (X)HTML et validation W3C
    Réponses: 2
    Dernier message: 18/11/2004, 01h27

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