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

Mise en page CSS Discussion :

Css d'un datatable


Sujet :

CSS

  1. #1
    Membre confirmé
    Homme Profil pro
    Étudiant
    Inscrit en
    Janvier 2012
    Messages
    59
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 34
    Localisation : France

    Informations professionnelles :
    Activité : Étudiant
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Janvier 2012
    Messages : 59
    Par défaut Css d'un datatable
    Bonjour,
    je viens vous ennuyer avec mon problème! Voila je travaille actuellement sur un site en Jsf (java) mais je rencontre un petit soucis... J'ai un tableau très vilain et moche et je souhaiterai le rendre plus jolie. je vous montre une photo:




    Ce que je souhaiterais faire c'est une découpe dans la longue liste avec le background vert... histoire de l'avoir en ligne puis de repasser à la ligne...
    Brf si vous ne comprenez pas ma demande, c'est pas grave. J'ai juste besoin d'avis extérieure pour rendre ceci plus jolie

    Merci !!!!

  2. #2
    Rédacteur

    Avatar de Torgar
    Homme Profil pro
    Développeur Web
    Inscrit en
    Août 2007
    Messages
    2 334
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 39
    Localisation : France, Hérault (Languedoc Roussillon)

    Informations professionnelles :
    Activité : Développeur Web

    Informations forums :
    Inscription : Août 2007
    Messages : 2 334
    Par défaut
    Salut,

    Pourrais-tu nous montrer ton code ?

    Supprime la présentation en table pour les chiffres sur fond vert. Et idéalement, supprime toutes présentations en table, c'est dépassé !
    Je ne suis pas schizophrène, nous sommes unanime !!!

    ► Pensez à la balise code et au CODE HTML GENERE !!!!
    ► Au si c'est le cas et au à ceux qui vous ont aidé.
    Vous souhaitez participer aux rubriques CSS et (X)HTML ? Contactez-nous !

    Créer des colonnes de même hauteur en CSS
    Glossaire CSS
    Les bordures en CSS3
    Les transitions en CSS3

  3. #3
    Membre confirmé
    Homme Profil pro
    Étudiant
    Inscrit en
    Janvier 2012
    Messages
    59
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 34
    Localisation : France

    Informations professionnelles :
    Activité : Étudiant
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Janvier 2012
    Messages : 59
    Par défaut
    Voila mon code source:
    Code html : 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
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    <!-- ______________________________________CODE_JSF______________________________________________________________________________ -->
    <form id="j_idt7" name="j_idt7" method="post" action="/eCamping/disponible.xhtml" enctype="application/x-www-form-urlencoded">
    <input type="hidden" name="j_idt7" value="j_idt7" />
    <table id="j_idt7:table" border="1" cellspacing="0" width="516">
    <thead>
    <tr><th colspan="4" scope="colgroup">Disponibilité des emplacements</th></tr>
    <tr>
    <th scope="col">Date</th>
    <th scope="col">Chalets 4 personnes</th>
    <th scope="col">Chalets 5 personnes</th>
    <th scope="col">Chalets 6 personnes</th>
    </tr>
    </thead>
    <tbody>
    <tr>
    <td><table id="j_idt7:table:0:date">
    <tbody>
    <tr>
    <td>15</td>
    </tr>
    <tr>
    <td>16</td>
    </tr>
    <tr>
    <td>17</td>
    </tr>
    <tr>
    <td>18</td>
    </tr>
    <tr>
    <td>19</td>
    </tr>
    <tr>
    <td>20</td>
    </tr>
    <tr>
    <td>21</td>
    </tr>
    <tr>
    <td>22</td>
    </tr>
    <tr>
    <td>23</td>
    </tr>
    <tr>
    <td>24</td>
    </tr>
    </tbody>
    </table>
    </td>
    <td><table id="j_idt7:table:0:t4" border="1" cellpadding="3" style="border-collapse: collapse; background-color: green">
    <tbody>
    <tr>
    <td>
    <script type="text/javascript" src="/eCamping/javax.faces.resource/jsf.js.xhtml?ln=javax.faces&amp;stage=Development"></script>
    <a href="#" onclick="mojarra.jsfcljs(document.getElementById('j_idt7'),{'j_idt7:table:0:t4:0:j_idt16':'j_idt7:table:0:t4:0:j_idt16'},'');return false">1</a></td>
    </tr>
    <tr>
    <td><a href="#" onclick="mojarra.jsfcljs(document.getElementById('j_idt7'),{'j_idt7:table:0:t4:1:j_idt16':'j_idt7:table:0:t4:1:j_idt16'},'');return false">2</a></td>
    </tr>
    <tr>
    <td><a href="#" onclick="mojarra.jsfcljs(document.getElementById('j_idt7'),{'j_idt7:table:0:t4:2:j_idt16':'j_idt7:table:0:t4:2:j_idt16'},'');return false">3</a></td>
    </tr>
    <tr>
    <td><a href="#" onclick="mojarra.jsfcljs(document.getElementById('j_idt7'),{'j_idt7:table:0:t4:3:j_idt16':'j_idt7:table:0:t4:3:j_idt16'},'');return false">13</a></td>
    </tr>
    <tr>
    <td><a href="#" onclick="mojarra.jsfcljs(document.getElementById('j_idt7'),{'j_idt7:table:0:t4:4:j_idt16':'j_idt7:table:0:t4:4:j_idt16'},'');return false">16</a></td>
    </tr>
    <tr>
    <td><a href="#" onclick="mojarra.jsfcljs(document.getElementById('j_idt7'),{'j_idt7:table:0:t4:5:j_idt16':'j_idt7:table:0:t4:5:j_idt16'},'');return false">19</a></td>
    </tr>
    <tr>
    <td><a href="#" onclick="mojarra.jsfcljs(document.getElementById('j_idt7'),{'j_idt7:table:0:t4:6:j_idt16':'j_idt7:table:0:t4:6:j_idt16'},'');return false">22</a></td>
    </tr>
    <tr>
    <td><a href="#" onclick="mojarra.jsfcljs(document.getElementById('j_idt7'),{'j_idt7:table:0:t4:7:j_idt16':'j_idt7:table:0:t4:7:j_idt16'},'');return false">25</a></td>
    </tr>
    <tr>
    <td><a href="#" onclick="mojarra.jsfcljs(document.getElementById('j_idt7'),{'j_idt7:table:0:t4:8:j_idt16':'j_idt7:table:0:t4:8:j_idt16'},'');return false">28</a></td>
    </tr>
    <tr>
    <td><a href="#" onclick="mojarra.jsfcljs(document.getElementById('j_idt7'),{'j_idt7:table:0:t4:9:j_idt16':'j_idt7:table:0:t4:9:j_idt16'},'');return false">29</a></td>
    </tr>
    <tr>
    <td><a href="#" onclick="mojarra.jsfcljs(document.getElementById('j_idt7'),{'j_idt7:table:0:t4:10:j_idt16':'j_idt7:table:0:t4:10:j_idt16'},'');return false">32</a></td>
    </tr>
    <tr>
    <td><a href="#" onclick="mojarra.jsfcljs(document.getElementById('j_idt7'),{'j_idt7:table:0:t4:11:j_idt16':'j_idt7:table:0:t4:11:j_idt16'},'');return false">36</a></td>
    </tr>
    <tr>
    <td><a href="#" onclick="mojarra.jsfcljs(document.getElementById('j_idt7'),{'j_idt7:table:0:t4:12:j_idt16':'j_idt7:table:0:t4:12:j_idt16'},'');return false">41</a></td>
    </tr>
    <tr>
    <td><a href="#" onclick="mojarra.jsfcljs(document.getElementById('j_idt7'),{'j_idt7:table:0:t4:13:j_idt16':'j_idt7:table:0:t4:13:j_idt16'},'');return false">42</a></td>
    </tr>
    <tr>
    <td><a href="#" onclick="mojarra.jsfcljs(document.getElementById('j_idt7'),{'j_idt7:table:0:t4:14:j_idt16':'j_idt7:table:0:t4:14:j_idt16'},'');return false">46</a></td>
    </tr>
    <tr>
    <td><a href="#" onclick="mojarra.jsfcljs(document.getElementById('j_idt7'),{'j_idt7:table:0:t4:15:j_idt16':'j_idt7:table:0:t4:15:j_idt16'},'');return false">47</a></td>
    </tr>
    <tr>
    <td><a href="#" onclick="mojarra.jsfcljs(document.getElementById('j_idt7'),{'j_idt7:table:0:t4:16:j_idt16':'j_idt7:table:0:t4:16:j_idt16'},'');return false">49</a></td>
    </tr>
    <tr>
    <td><a href="#" onclick="mojarra.jsfcljs(document.getElementById('j_idt7'),{'j_idt7:table:0:t4:17:j_idt16':'j_idt7:table:0:t4:17:j_idt16'},'');return false">53</a></td>
    </tr>
    <tr>
    <td><a href="#" onclick="mojarra.jsfcljs(document.getElementById('j_idt7'),{'j_idt7:table:0:t4:18:j_idt16':'j_idt7:table:0:t4:18:j_idt16'},'');return false">55</a></td>
    </tr>
    <tr>
    <td><a href="#" onclick="mojarra.jsfcljs(document.getElementById('j_idt7'),{'j_idt7:table:0:t4:19:j_idt16':'j_idt7:table:0:t4:19:j_idt16'},'');return false">58</a></td>
    </tr>
    <tr>
    <td><a href="#" onclick="mojarra.jsfcljs(document.getElementById('j_idt7'),{'j_idt7:table:0:t4:20:j_idt16':'j_idt7:table:0:t4:20:j_idt16'},'');return false">61</a></td>
    </tr>
    <tr>
    <td><a href="#" onclick="mojarra.jsfcljs(document.getElementById('j_idt7'),{'j_idt7:table:0:t4:21:j_idt16':'j_idt7:table:0:t4:21:j_idt16'},'');return false">64</a></td>
    </tr>
    <tr>
    <td><a href="#" onclick="mojarra.jsfcljs(document.getElementById('j_idt7'),{'j_idt7:table:0:t4:22:j_idt16':'j_idt7:table:0:t4:22:j_idt16'},'');return false">67</a></td>
    </tr>
    <tr>
    <td><a href="#" onclick="mojarra.jsfcljs(document.getElementById('j_idt7'),{'j_idt7:table:0:t4:23:j_idt16':'j_idt7:table:0:t4:23:j_idt16'},'');return false">71</a></td>
    </tr>
    <tr>
    <td><a href="#" onclick="mojarra.jsfcljs(document.getElementById('j_idt7'),{'j_idt7:table:0:t4:24:j_idt16':'j_idt7:table:0:t4:24:j_idt16'},'');return false">74</a></td>
    </tr>
    <tr>
    <td><a href="#" onclick="mojarra.jsfcljs(document.getElementById('j_idt7'),{'j_idt7:table:0:t4:25:j_idt16':'j_idt7:table:0:t4:25:j_idt16'},'');return false">77</a></td>
    </tr>
    <tr>
    <td><a href="#" onclick="mojarra.jsfcljs(document.getElementById('j_idt7'),{'j_idt7:table:0:t4:26:j_idt16':'j_idt7:table:0:t4:26:j_idt16'},'');return false">82</a></td>
    </tr>
    <tr>
    <td><a href="#" onclick="mojarra.jsfcljs(document.getElementById('j_idt7'),{'j_idt7:table:0:t4:27:j_idt16':'j_idt7:table:0:t4:27:j_idt16'},'');return false">85</a></td>
    </tr>
    <tr>
    <td><a href="#" onclick="mojarra.jsfcljs(document.getElementById('j_idt7'),{'j_idt7:table:0:t4:28:j_idt16':'j_idt7:table:0:t4:28:j_idt16'},'');return false">86</a></td>
    </tr>
    <tr>
    <td><a href="#" onclick="mojarra.jsfcljs(document.getElementById('j_idt7'),{'j_idt7:table:0:t4:29:j_idt16':'j_idt7:table:0:t4:29:j_idt16'},'');return false">91</a></td>
    </tr>
    </tbody>
    </table>
    </td>
    <td><table id="j_idt7:table:0:t5" border="1" cellpadding="3">
    <tbody>
    <tr><td></td></tr></tbody>
    </table>
    </td>
    <td><table id="j_idt7:table:0:t6" border="1" cellpadding="3">
    <tbody>
    <tr><td></td></tr></tbody>
    </table>
    </td>
    </tr>
    </tbody>
    </table>
    <input type="submit" name="j_idt7:j_idt25" value="Réservation" /><input type="hidden" name="javax.faces.ViewState" id="javax.faces.ViewState" value="-6083934167156862321:-7393076500897615599" autocomplete="off" />
    </form>
     
     
                        <!-- _____________________________________________________________________________________________________________________________ -->


    Par contre j'ai pas vraiment le choix de l'afficher dans un datatable car je travaille avec une liste à la base.. à moins qu'il y a une autre possibilité que je ne connais pas.

    merci de ta réponse rapide.


    Edit:

    je met la partie html dans la quelle moi je boss.. si ça peut aider.

    Code html : 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
    <!-- ______________________________________CODE_JSF______________________________________________________________________________ -->
     
     
                        <f:view>
     
                            <h:form>
                                <h:dataTable id="table" value="" var="item" width="516" cellspacing="0" border="1">
                                    <f:facet name="header">
                                        <h:outputText value="Disponibilité des emplacements"/>
                                    </f:facet>
                                    <h:column>
                                        <f:facet name="header">
                                            <h:outputText value="Date"/>
                                        </f:facet>
                                        <h:dataTable id="date" value="#{disponible.listSemaine}" var="etat" >
                                            <h:column>
                                                <h:outputText value="#{etat}" />
                                            </h:column>
                                        </h:dataTable>
                                    </h:column>
                                    <h:column>
                                        <f:facet name="header">
                                            <h:outputText value="Chalets 4 personnes"/>
                                        </f:facet>
                                        <h:dataTable id="t4" value="#{disponible.listEmplacement}" var="etat" cellpadding="3" style="border-collapse: collapse; background-color: green" border="1">
                                            <h:column>
                                                <h:commandLink value="#{etat.id}" action="#{reserve.takeInfo()}">   
                                                    <f:setPropertyActionListener value="#{etat}" target="#{reserve.newReserve.idEmplacement}" />
                                                </h:commandLink> 
                                            </h:column>
                                        </h:dataTable>
                                    </h:column>
                                    <h:column>
                                        <f:facet name="header">
                                            <h:outputText value="Chalets 5 personnes"/>
                                        </f:facet>
                                        <h:dataTable id="t5" value="#{reserve.listReserve}" var="etat" cellpadding="3" border="1">
                                            <h:column>
                                                <h:commandLink value="#{etat.idEmplacement}" action="#{reserve.takeInfo()}" style="background-color: green">   
                                                    <f:setPropertyActionListener value="#{etat}" target="#{reserve.newReserve.idEmplacement}" />
                                                </h:commandLink> 
                                            </h:column>
                                        </h:dataTable>
                                    </h:column>
                                    <h:column>
                                        <f:facet name="header">
                                            <h:outputText value="Chalets 6 personnes"/>
                                        </f:facet>
                                        <h:dataTable id="t6" value="#{reserve.listReserve}" var="etat" cellpadding="3" border="1">
                                            <h:column>
                                                <h:commandLink value="#{etat.idEmplacement}" action="#{reserve.takeInfo()}" style="background-color: green">   
                                                    <f:setPropertyActionListener value="#{etat}" target="#{reserve.newReserve.idEmplacement}" />
                                                </h:commandLink> 
                                            </h:column>
                                        </h:dataTable>
                                    </h:column>
                                </h:dataTable> 
     
                                <h:commandButton value="Réservation" action="reservation" />
                            </h:form>
                        </f:view>
     
     
                        <!-- _____________________________________________________________________________________________________________________________ -->

Discussions similaires

  1. Style dataTable CSS
    Par ahmedpa dans le forum JSF
    Réponses: 1
    Dernier message: 13/11/2014, 08h22
  2. JSF2.0 + primeFaces2 + css + dataTable
    Par chercheur11 dans le forum JSF
    Réponses: 0
    Dernier message: 21/06/2010, 12h27
  3. css dans un rich:datatable
    Par raimus88 dans le forum JSF
    Réponses: 6
    Dernier message: 21/04/2010, 22h58
  4. [Richfaces] datatable et css pour surligner une ligne
    Par omegabahamut dans le forum JSF
    Réponses: 2
    Dernier message: 07/09/2009, 11h50
  5. Réponses: 5
    Dernier message: 19/07/2007, 16h51

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