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 :

[BootStrap] Création tableau responsive


Sujet :

Responsive design en CSS avec Bootstrap

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Membre averti
    Homme Profil pro
    Webmaster
    Inscrit en
    Mars 2019
    Messages
    20
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Tunisie

    Informations professionnelles :
    Activité : Webmaster

    Informations forums :
    Inscription : Mars 2019
    Messages : 20
    Par défaut [BootStrap] Création tableau responsive
    bonjour quelqu'un aider pour afficher la liste des articles selon base sql avec une table resposive boostrap
    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
    <div class="container">
        <div class="row">
     
     
            <div class="col-md-10 col-md-offset-1">
     
                <div class="panel panel-default panel-table">
                  <div class="panel-heading">
                    <div class="row">
                      <div class="col col-xs-6">
     
                      </div>
     
                    </div>
                  </div>
                  <div class="panel-body">
                    <table class="table table-striped table-bordered table-list">
                      <thead>
                        <tr>
                            <th><em class="fa fa-cog"></em></th>
                            <th class="hidden-xs">numero</th>
                            <th>Nom article</th>
                            <th>quantite</th>
    						<th>date mise en stock</th>
    						<th>quantite restante</th>
                        </tr> 
                      </thead>
                      <tbody>
                              <tr>
                                <td align="center">
                                  <a class="btn btn-default"><em class="fa fa-pencil"></em></a>
                                  <a class="btn btn-danger"><em class="fa fa-trash"></em></a>
                                </td>
                                <td class="hidden-xs">1</td>
                                <?php
    include("connection.php");
    $reqt=mysql_query("select * from `article` " );
    while($row=mysql_fetch_array($reqt))
    {
    $id_art=$row[0];
    $nomart=$row[1];
    $qteart=$row[2];
    $date_achat=$row[3];
    $qte_rest=$row[3];
     
    ?>
     
     
     
    	   <tr>  
    	   <td><?php echo"$id_art";?></td>
            <td><?php echo"$nomart";?></td>
            <td><?php echo"$qteart";?></td>
           <td><?php echo"$date_achat";?></td>
    	 <td><?php echo"$qte_rest";?></td>
    		<td><?php echo"<a href=supprime_com.php?id_art=$id_art><img src='images/slider/sup.png'></a>"; ?></td>
    		<td><?php echo"<a href=modif_com.php?id_art=$id_art><img src='images/slider/mod.png'></a>"; ?></td>
     
    		</tr>
     
        <?php }?>
                              </tr>
     
                            </tbody>
                    </table>
     
     
     
    </div></div>
    </div>
    	</div></div>
    </center>
    et css soit
    Code css : 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
    body{background:lightgray}
    .panel-table .panel-body{
      padding:0;
    }
     
    .panel-table .panel-body .table-bordered{
      border-style: none;
      margin:0;
    }
     
    .panel-table .panel-body .table-bordered > thead > tr > th:first-of-type {
        text-align:center;
        width: 100px;
    }
     
    .panel-table .panel-body .table-bordered > thead > tr > th:last-of-type,
    .panel-table .panel-body .table-bordered > tbody > tr > td:last-of-type {
      border-right: 0px;
    }
     
    .panel-table .panel-body .table-bordered > thead > tr > th:first-of-type,
    .panel-table .panel-body .table-bordered > tbody > tr > td:first-of-type {
      border-left: 0px;
    }
     
    .panel-table .panel-body .table-bordered > tbody > tr:first-of-type > td{
      border-bottom: 0px;
    }
     
    .panel-table .panel-body .table-bordered > thead > tr:first-of-type > th{
      border-top: 0px;
    }
     
    .panel-table .panel-footer .pagination{
      margin:0; 
    }
     
    /*
    used to vertically center elements, may need modification if you're not using default sizes.
    */
    .panel-table .panel-footer .col{
     line-height: 34px;
     height: 34px;
    }
     
    .panel-table .panel-heading .col h3{
     line-height: 30px;
     height: 30px;
    }
     
    .panel-table .panel-body .table-bordered > tbody > tr > td{
      line-height: 34px;
    }

  2. #2
    Membre éclairé Avatar de Tillo
    Homme Profil pro
    Webmaster
    Inscrit en
    Octobre 2007
    Messages
    494
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 45
    Localisation : France, Nord (Nord Pas de Calais)

    Informations professionnelles :
    Activité : Webmaster
    Secteur : High Tech - Multimédia et Internet

    Informations forums :
    Inscription : Octobre 2007
    Messages : 494
    Par défaut
    Bonjour,

    J’espère que depuis le 23 mars tu as trouvé une réponse, mais au cas où, j'avais trouvé une méthode sur ce forum.
    Je suis en train de la mettre en place pour la future mise à jour de l'un de mes sites, je trouve ça plutôt pas mal.

    https://www.developpez.net/forums/d1...ux-responsive/

    (bon.. c'est pas trés Bootstrap mais ça marche)

    Sinon, il y a aussi une classe Bootstrap qui fait ça très bien.

    https://getbootstrap.com/docs/4.0/co...ays-responsive

    Bon courage !
    Tillo.

Discussions similaires

  1. probleme creation tableau de string
    Par redox13 dans le forum MATLAB
    Réponses: 3
    Dernier message: 24/04/2009, 09h19
  2. [MySQL] creation tableau agenda
    Par renaudgarnier dans le forum PHP & Base de données
    Réponses: 2
    Dernier message: 13/01/2009, 14h59
  3. Creation tableau avec array
    Par Vascogil dans le forum SAS Base
    Réponses: 4
    Dernier message: 23/01/2008, 20h55
  4. [Tableaux] creation tableau multidimensionnel
    Par calitom dans le forum Langage
    Réponses: 4
    Dernier message: 23/11/2006, 15h31
  5. Erreur creation tableau
    Par jamy79 dans le forum iReport
    Réponses: 1
    Dernier message: 02/11/2006, 14h01

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