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 :

[W3C] Désactiver les sauts à la ligne automatique ?


Sujet :

HTML

  1. #1
    Membre averti Avatar de Ekinoks
    Profil pro
    Étudiant
    Inscrit en
    Novembre 2003
    Messages
    687
    Détails du profil
    Informations personnelles :
    Âge : 37
    Localisation : France, Bouches du Rhône (Provence Alpes Côte d'Azur)

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Novembre 2003
    Messages : 687
    Points : 358
    Points
    358
    Par défaut [W3C] Désactiver les sauts à la ligne automatique ?
    Salut !!

    J'ai un tableau de "1 ligne" et "N colonnes", J'aimerais que tout mes colonne sauf la dernier soit de taille minimum et que ma dernier prenne toute la place restante !

    Le problème et que lorsque j'essaye de faire ça, a chaque [espace] il y a des retours à la ligne... alors que moi je souhaiterais que tout reste sur une même ligne...

    Es possible de faire ça ?

    voici le code source que j'utilise actuellement :
    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
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
     
    <html>
    <head>
    <title>Site</title>
    </head>
    <body>
    <br>
    <br>
    <table style="width: 100%; height: 32px; text-align: left;" border="0" cellpadding="0" cellspacing="0">
    <tbody>
    <tr>
        <td style="background-color: rgb(249, 249, 249); vertical-align: top; height: 32px;">
            <table style="width: 100%; text-align: left;" border="0" cellpadding="0" cellspacing="0">
                <tbody>
     
                <tr>
                    <td style="vertical-align: top;"><img alt="" src="Image/bordure_onglet_inactife_haut.png" style="width: 100%; height: 7px;"><br></td>
                </tr>
     
                <tr>
                    <td style="background-color: rgb(249, 249, 249); text-align: center; height: 19px; vertical-align: top;"><font size="-1"> MenU 1 </font><br></td>
                </tr>
     
                <tr>
                    <td style="vertical-align: top;"><img alt="" src="Image/bordure_onglet_inactife_bas.png" style="width: 100%; height: 6px;"><br></td>
                </tr>
            </tbody>
            </table>
        </td>
        <td style="width: 13px; vertical-align: top; height: 32px;"><img alt="" src="Image/bordure_onglet_inactife_separation.png" style="width: 13px; height: 32px;"></td>
        <td style="vertical-align: top; height: 32px;">
            <table style="width: 100%; text-align: left;" border="0" cellpadding="0" cellspacing="0">
            <tbody>
                <tr>
                    <td style="vertical-align: top;"><img alt="" src="Image/bordure_onglet_inactife_haut.png" style="width: 100%; height: 7px;"><br></td>
                </tr>
     
                <tr>
                    <td style="background-color: rgb(249, 249, 249); text-align: center; height: 19px; vertical-align: top;"><font size="-1"> Menu 2 </font></td>
                </tr>
     
                <tr>
                    <td style="vertical-align: top;"><img alt="" src="Image/bordure_onglet_inactife_bas.png" style="width: 100%; height: 6px;"><br></td>
                </tr>
            </tbody>
            </table>
        </td>
        <td style="width: 13px; vertical-align: top; height: 32px;"><img alt="" src="Image/bordure_onglet_actife_gauche.png" style="width: 13px; height: 32px;"></td>
        <td style="vertical-align: top; height: 32px;">
            <table style="width: 100%; text-align: left;" border="0" cellpadding="0" cellspacing="0">
            <tbody>
                <tr>
                    <td style="vertical-align: top;"><img alt="" src="Image/bordure_onglet_actife_haut.png" style="width: 100%; height: 7px;"><br></td>
                </tr>
     
                <tr>
                    <td style="background-color: rgb(254, 254, 254); text-align: center; height: 19px; vertical-align: top;"><font size="-1">Page 3</font></td>
                </tr>
     
                <tr>
                    <td style="vertical-align: top;"><img alt="" src="Image/bordure_onglet_actife_bas.png" style="width: 100%; height: 6px;"><br></td>
                </tr>
            </tbody>
            </table>
        </td>
        <td style="width: 13px; vertical-align: top; height: 32px;"><img alt="" src="Image/bordure_onglet_actife_droite.png" style="width: 13px; height: 32px;"></td>
        <td style="vertical-align: top; height: 32px;">
            <table style="width: 100%; text-align: left;" border="0" cellpadding="0" cellspacing="0">
            <tbody>
                <tr>
                    <td style="vertical-align: top;"><img alt="" src="Image/bordure_onglet_inactife_haut.png" style="width: 100%; height: 7px;"><br></td>
                </tr>
     
                <tr>
                    <td style="background-color: rgb(249, 249, 249); text-align: center; height: 19px; vertical-align: top;"><font size="-1">Page 4</font></td>
                </tr>
     
                <tr>
                    <td style="vertical-align: top;"><img alt="" src="Image/bordure_onglet_inactife_bas.png" style="width: 100%; height: 6px;"><br></td>
                </tr>
            </tbody>
            </table>
        </td>
     
        <td style="width: 13px; vertical-align: top; height: 32px;"><img alt="" src="Image/bordure_onglet_inactife_separation.png" style="width: 13px; height: 32px;"></td>
        <td style="vertical-align: top; height: 32px;">
            <table style="width: 100%; text-align: left;" border="0" cellpadding="0" cellspacing="0">
            <tbody>
                <tr>
                    <td style="vertical-align: top;"><img alt="" src="Image/bordure_onglet_inactife_haut.png" style="width: 100%; height: 7px;"></td>
                </tr>
     
                <tr>
                    <td style="background-color: rgb(249, 249, 249); text-align: center; height: 19px; vertical-align: top;"><font size="-1">dergnier onglet</font></td>
                </tr>
     
                <tr>
                    <td style="vertical-align: top;"><img alt="" src="Image/bordure_onglet_inactife_bas.png" style="width: 100%; height: 6px;"></td>
                </tr>
            </tbody>
            </table>
        </td>
     
        <td style="width: 13px; vertical-align: top; height: 32px;"><img alt="" src="Image/bordure_dernier_onglet_inactife_droite.png" style="width: 13px; height: 32px;"></td>
        <td style="width: 100%; vertical-align: top;">
            <table style="height: 32px; width: 100%; text-align: left;" border="0" cellpadding="0" cellspacing="0">
            <tbody>
                <tr>
                    <td style="vertical-align: top;"><img alt="" src="Image/bordure_pas_onglet_haut.png" style="width: 100%; height: 7px;"></td>
                </tr>
     
                <tr>
                    <td style="height: 19px; background-color: rgb(245, 245, 245); vertical-align: top;"></td>
                </tr>
     
                <tr>
                    <td style="vertical-align: top;"><img alt="" src="Image/bordure_pas_onglet_bas.png" style="width: 100%; height: 6px;"></td>
                </tr>
            </tbody>
            </table>
        </td>
    </tr>
    </tbody>
    </table>
    </body>
    </html>
    Merci pour votre aide.

  2. #2
    Membre expert
    Avatar de trotters213
    Profil pro
    Inscrit en
    Janvier 2005
    Messages
    2 571
    Détails du profil
    Informations personnelles :
    Âge : 38
    Localisation : France, Gard (Languedoc Roussillon)

    Informations forums :
    Inscription : Janvier 2005
    Messages : 2 571
    Points : 3 145
    Points
    3 145
    Par défaut

    Je pense qu'il serait plus judicieux que tu envisage une mise en page à base de div et de CSS plutôt qu'avec un tableau parce que ton code est assez illisible (et lourd).

    Sinon je pas bien compris ton problème d'espace, tu peux reformuler stp ?

  3. #3
    Membre habitué
    Inscrit en
    Novembre 2005
    Messages
    240
    Détails du profil
    Informations forums :
    Inscription : Novembre 2005
    Messages : 240
    Points : 145
    Points
    145
    Par défaut
    si tu veux faire ca absolument dans un tableau, il faut rajouter la propriete "nowrap" dans les cellules ou tu ne veux pas de retour a la ligne.

    mais moi aussi je te conseille de travailler le plus possible en <div>

  4. #4
    Membre averti Avatar de Ekinoks
    Profil pro
    Étudiant
    Inscrit en
    Novembre 2003
    Messages
    687
    Détails du profil
    Informations personnelles :
    Âge : 37
    Localisation : France, Bouches du Rhône (Provence Alpes Côte d'Azur)

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Novembre 2003
    Messages : 687
    Points : 358
    Points
    358
    Par défaut
    Merci pour vos réponses.

    Ok, je vais réfléchir à utiliser les <div> alors, mais quel sont les avantages des <div> par rapport aux tableaux ?

  5. #5
    Modérateur
    Avatar de blueice
    Homme Profil pro
    Développeur Web
    Inscrit en
    Mars 2003
    Messages
    3 487
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 49
    Localisation : France, Alpes Maritimes (Provence Alpes Côte d'Azur)

    Informations professionnelles :
    Activité : Développeur Web
    Secteur : High Tech - Multimédia et Internet

    Informations forums :
    Inscription : Mars 2003
    Messages : 3 487
    Points : 5 134
    Points
    5 134
    Par défaut
    Ils servent à la mise en page, alors que les tableaux sont là pour présenter des données tabulaires.
    -_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_SIGNATURE -_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-
    Dans la mesure du possible, essayez de montrer votre problème en situation réelle en nous donnant une url, que l'on puisse tester.
    Pensez également à cocher

    Aucun problème ne doit être résolu en MP (Message Privé) le forum est là pour ça.

    Dimension Internet

  6. #6
    Membre expert
    Avatar de trotters213
    Profil pro
    Inscrit en
    Janvier 2005
    Messages
    2 571
    Détails du profil
    Informations personnelles :
    Âge : 38
    Localisation : France, Gard (Languedoc Roussillon)

    Informations forums :
    Inscription : Janvier 2005
    Messages : 2 571
    Points : 3 145
    Points
    3 145
    Par défaut
    Citation Envoyé par blueice
    Ils servent à la mise en page, alors que les tableaux sont là pour présenter des données tabulaires.
    Je rajouterais que cela alourdit ton code (car multiplication des balises nécessaires à la déclaration d'un tableau) et qu'en plus de l'alourdir, ça le rend assez illisible.

  7. #7
    Membre à l'essai
    Profil pro
    Étudiant
    Inscrit en
    Février 2007
    Messages
    18
    Détails du profil
    Informations personnelles :
    Âge : 40
    Localisation : France

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Février 2007
    Messages : 18
    Points : 11
    Points
    11
    Par défaut
    Bonjour a tous.

    On peut également utiliser la balise nobr
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    <nobr>Mon texte très très long, sur une ligne</nobr>
    Note : Des barres de défilement horizontaux risque d'apparaître.

    Franck.

  8. #8
    Membre averti Avatar de Ekinoks
    Profil pro
    Étudiant
    Inscrit en
    Novembre 2003
    Messages
    687
    Détails du profil
    Informations personnelles :
    Âge : 37
    Localisation : France, Bouches du Rhône (Provence Alpes Côte d'Azur)

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Novembre 2003
    Messages : 687
    Points : 358
    Points
    358
    Par défaut
    Ok !
    Merci pour toutes vos réponses =)


  9. #9
    Membre expert
    Avatar de trotters213
    Profil pro
    Inscrit en
    Janvier 2005
    Messages
    2 571
    Détails du profil
    Informations personnelles :
    Âge : 38
    Localisation : France, Gard (Languedoc Roussillon)

    Informations forums :
    Inscription : Janvier 2005
    Messages : 2 571
    Points : 3 145
    Points
    3 145
    Par défaut
    Citation Envoyé par Franck94
    Bonjour a tous.

    On peut également utiliser la balise nobr
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    <nobr>Mon texte très très long, sur une ligne</nobr>
    Cette balise n'est pas aux normes du W3C

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. Réponses: 16
    Dernier message: 22/03/2006, 11h11
  2. Passer outre les "saut de ligne"
    Par calimero642 dans le forum Langage
    Réponses: 9
    Dernier message: 16/03/2006, 11h38
  3. [Mail] Les sauts de lignes pas pris en compte
    Par Anduriel dans le forum Langage
    Réponses: 15
    Dernier message: 14/12/2005, 19h13
  4. Réponses: 8
    Dernier message: 17/11/2005, 12h24
  5. [JtextArea] Transmetre les sauts de ligne à un fichier
    Par romuluslepunk dans le forum Composants
    Réponses: 4
    Dernier message: 04/08/2005, 21h34

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