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 :

Mise en colonne éléments


Sujet :

Tableau en CSS

  1. #1
    Nouveau membre du Club
    Profil pro
    Inscrit en
    Mai 2012
    Messages
    57
    Détails du profil
    Informations personnelles :
    Localisation : Suisse

    Informations forums :
    Inscription : Mai 2012
    Messages : 57
    Points : 36
    Points
    36
    Par défaut Mise en colonne éléments
    Bonjour tout le monde,

    Je m'essaye depuis quelques jours au HTML avec plus ou moins de succès.. ayant juste une petit notion de vba j'arrive un peu a me débrouiller mais la je rame complet...
    et pense qu'il y a beaucoup a redire sur ma façon de programmer donc si vous pouviez m'aider un peu.. car j'ai quelques problème de mise en page...

    Voilà au stade ou j'en suis..
    Nom : Capture du 2018-03-16 22-14-15.png
Affichages : 118
Taille : 78,3 Ko

    Et voilà ou je voudrai arriver
    Nom : final.png
Affichages : 133
Taille : 378,8 Ko

    Voilà le code que j'utilise :
    HTML
    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
     
        <!doctype html>
        <html lang="fr">
            <head>
     
                <meta charset="utf-8">
                <title>Test commande GPIO</title>
     
                <link rel="stylesheet" type="text/css" href="stylesheet.css">
     
     
            </head>
            <body>
     
     
                <form action="script.php" method="post">
     
     
     
    		<div class="EnteteToggle">
    		<p>Relais n°1 </p>
    		</div>
     
               	<div class="onoffswitch1">
     
            		<input type="checkbox" name="onoffswitch1" class="onoffswitch-checkbox1" id="myonoffswitch1" NotChecked>
    				<label class="onoffswitch-label1" for="myonoffswitch1"> 
                				<span class="onoffswitch-inner1"></span>
                				<span class="onoffswitch-switch1"></span>
            			</label> 				
       		</div>
     
    <div class="EnteteToggle">
    		<p>Scénario n°1 </p>
    		</div>
     
        <div class="onoffswitch">
            <input type="checkbox" name="onoffswitch" class="onoffswitch-checkbox" id="myonoffswitch" checked>
            <label class="onoffswitch-label" for="myonoffswitch">
                <span class="onoffswitch-inner"></span>
                <span class="onoffswitch-switch"></span>
            </label>
        </div>
     
     
    		<div class="EnteteToggle">
    		<p>Relais n°2 </p>
    		</div>
     
    		<div class="onoffswitch2">
           			<input type="checkbox" name="onoffswitch2" class="onoffswitch-checkbox2" id="myonoffswitch2" NotChecked>
            			<label class="onoffswitch-label2" for="myonoffswitch2">
               				 <span class="onoffswitch-inner2"></span>
              				  <span class="onoffswitch-switch2"></span>
            			</label>
        		</div>
     
    		<hr></hr>
     
    		<div class="EnteteToggle">
    		<p>Relais n°3</p>
    		</div>
     
    		<div class="onoffswitch3">
           			 <input type="checkbox" name="onoffswitch3" class="onoffswitch-checkbox3" id="myonoffswitch3" NotChecked>
            			<label class="onoffswitch-label3" for="myonoffswitch3">
               				 <span class="onoffswitch-inner3"></span>
              				  <span class="onoffswitch-switch3"></span>
            			</label>
        		</div>
     
    		<div class="EnteteToggle">
    		<p>Relais n°4</p>
    		</div>
    		<div class="onoffswitch4">
           			 <input type="checkbox" name="onoffswitch4" class="onoffswitch-checkbox4" id="myonoffswitch4" NotChecked>
            			<label class="onoffswitch-label4" for="myonoffswitch4">
               				 <span class="onoffswitch-inner4"></span>
              				  <span class="onoffswitch-switch4"></span>
            			</label>
        		</div>
     
    		<div class="EnteteToggle">
    		<p>Relais n°5</p>
    		</div>
    		<div class="onoffswitch5">
           			 <input type="checkbox" name="onoffswitch5" class="onoffswitch-checkbox5" id="myonoffswitch5" NotChecked>
            			<label class="onoffswitch-label5" for="myonoffswitch5">
               				 <span class="onoffswitch-inner5"></span>
              				  <span class="onoffswitch-switch5"></span>
            			</label>
        		</div>
     
    		<hr></hr>
     
    		<div class="EnteteToggle">
    		<p>Relais n°6</p>
    		</div>
    		<div class="onoffswitch6">
           			 <input type="checkbox" name="onoffswitch6" class="onoffswitch-checkbox6" id="myonoffswitch6" NotChecked>
            			<label class="onoffswitch-label6" for="myonoffswitch6">
               				 <span class="onoffswitch-inner6"></span>
              				  <span class="onoffswitch-switch6"></span>
            			</label>
        		</div>
     
    		<div class="EnteteToggle">
    		<p>Relais n°7</p>
    		</div>
    		<div class="onoffswitch7">
           			 <input type="checkbox" name="onoffswitch7" class="onoffswitch-checkbox7" id="myonoffswitch7" NotChecked>
            			<label class="onoffswitch-label7" for="myonoffswitch7">
               				 <span class="onoffswitch-inner7"></span>
              				  <span class="onoffswitch-switch7"></span>
            			</label>
        		</div>
     
    		<hr></hr>
     
    		<div class="EnteteToggle">
    		<p>Relais n°8</p>
    		</div>
    		<div class="onoffswitch8">
           			 <input type="checkbox" name="onoffswitch8" class="onoffswitch-checkbox8" id="myonoffswitch8" NotChecked>
            			<label class="onoffswitch-label8" for="myonoffswitch8">
               				 <span class="onoffswitch-inner8"></span>
              				  <span class="onoffswitch-switch8"></span>
            			</label>
        		</div>
     
     
                </form>
     
            </body>
        </html>

    CSS
    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
    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
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    280
    281
    282
    283
    284
    285
    286
    287
    288
    289
    290
    291
    292
    293
    294
    295
    296
    297
    298
    299
    300
    301
    302
    303
    304
    305
    306
    307
    308
    309
    310
    311
    312
    313
    314
    315
    316
    317
    318
    319
    320
    321
    322
    323
    324
    325
    326
    327
    328
    329
    330
    331
    332
    333
    334
    335
    336
    337
    338
    339
    340
    341
    342
    343
    344
    345
    346
    347
    348
    349
    350
    351
    352
    353
    354
    355
    356
    357
    358
    359
    360
    361
    362
    363
    364
    365
    366
    367
    368
    369
    370
    371
    372
    373
    374
    375
    376
    377
    378
    379
    380
    381
    382
    383
    384
    385
    386
    387
    388
    389
    390
    391
    392
    393
    394
    395
    396
    397
    398
    399
    400
    401
    402
    403
    404
    405
    406
    407
    408
    409
    410
    411
    412
    413
    414
    415
    416
    417
    418
    419
    420
    421
    422
    423
    424
    425
    426
    427
    428
    429
    430
    431
    432
    433
    434
    435
    436
     
    html, body
     
     
     
     
    .EnteteToggle {
    position: relative; width: 200px
    }
     
        .onoffswitch {
            position: relative; width: 174px;
            -webkit-user-select:none; -moz-user-select:none; -ms-user-select: none;
        }
        .onoffswitch-checkbox {
            display: none;
        }
        .onoffswitch-label {
            display: block; overflow: hidden; cursor: pointer;
            border: 2px solid #999999; border-radius: 6px;
        }
        .onoffswitch-inner {
            display: block; width: 200%; margin-left: -100%;
            transition: margin 0.3s ease-in 0s;
        }
        .onoffswitch-inner:before, .onoffswitch-inner:after {
            display: block; float: left; width: 50%; height: 30px; padding: 0; line-height: 30px;
            font-size: 14px; color: white; font-family: Trebuchet, Arial, sans-serif; font-weight: bold;
            box-sizing: border-box;
        }
        .onoffswitch-inner:before {
            content: "MANUEL";
            padding-left: 10px;
            background-color: #FF9100; color: #FFFFFF;
        }
        .onoffswitch-inner:after {
            content: "AUTOMATIQUE";
            padding-right: 10px;
            background-color: #EEEEEE; color: #999999;
            text-align: right;
        }
        .onoffswitch-switch {
            display: block; width: 35px; margin: -2.5px;
            background: #FFFFFF;
            position: absolute; top: 0; bottom: 0;
            right: 140px;
            border: 2px solid #999999; border-radius: 6px;
            transition: all 0.3s ease-in 0s; 
        }
        .onoffswitch-checkbox:checked + .onoffswitch-label .onoffswitch-inner {
            margin-left: 0;
        }
        .onoffswitch-checkbox:checked + .onoffswitch-label .onoffswitch-switch {
            right: 0px; 
        }
     
     
    .onoffswitch1 {
            position: relative; width: 90px;
            -webkit-user-select:none; -moz-user-select:none; -ms-user-select: none;
        }
        .onoffswitch-checkbox1 {
            display: none;
        }
        .onoffswitch-label1 {
            display: block; overflow: hidden; cursor: pointer;
            border: 2px solid #999999; border-radius: 20px;
        }
        .onoffswitch-inner1 {
            display: block; width: 200%; margin-left: -100%;
            transition: margin 0.3s ease-in 0s;
        }
        .onoffswitch-inner1:before, .onoffswitch-inner1:after {
            display: block; float: left; width: 50%; height: 30px; padding: 0; line-height: 30px;
            font-size: 14px; color: white; font-family: Trebuchet, Arial, sans-serif; font-weight: bold;
            box-sizing: border-box;
        }
        .onoffswitch-inner1:before {
            content: "ON";
            padding-left: 10px;
            background-color: #34A7C1; color: #FFFFFF;
        }
        .onoffswitch-inner1:after {
            content: "OFF";
            padding-right: 10px;
            background-color: #EEEEEE; color: #999999;
            text-align: right;
        }
        .onoffswitch-switch1 {
            display: block; width: 36px; margin: -3px;
            background: #FFFFFF;
            position: absolute; top: 0; bottom: 0;
            right: 56px;
            border: 2px solid #999999; border-radius: 20px;
            transition: all 0.3s ease-in 0s; 
        }
        .onoffswitch-checkbox1:checked + .onoffswitch-label1 .onoffswitch-inner1 {
            margin-left: 0;
        }
        .onoffswitch-checkbox1:checked + .onoffswitch-label1 .onoffswitch-switch1 {
            right: 0px; 
        }
     
     
     
    .onoffswitch2 {
            position: relative; width: 90px;
            -webkit-user-select:none; -moz-user-select:none; -ms-user-select: none;
        }
        .onoffswitch-checkbox2 {
            display: none;
        }
        .onoffswitch-label2 {
            display: block; overflow: hidden; cursor: pointer;
            border: 2px solid #999999; border-radius: 20px;
        }
        .onoffswitch-inner2 {
            display: block; width: 200%; margin-left: -100%;
            transition: margin 0.3s ease-in 0s;
        }
        .onoffswitch-inner2:before, .onoffswitch-inner2:after {
            display: block; float: left; width: 50%; height: 30px; padding: 0; line-height: 30px;
            font-size: 14px; color: white; font-family: Trebuchet, Arial, sans-serif; font-weight: bold;
            box-sizing: border-box;
        }
        .onoffswitch-inner2:before {
            content: "ON";
            padding-left: 10px;
            background-color: #34A7C1; color: #FFFFFF;
        }
        .onoffswitch-inner2:after {
            content: "OFF";
            padding-right: 10px;
            background-color: #EEEEEE; color: #999999;
            text-align: right;
        }
        .onoffswitch-switch2 {
            display: block; width: 36px; margin: -3px;
            background: #FFFFFF;
            position: absolute; top: 0; bottom: 0;
            right: 56px;
            border: 2px solid #999999; border-radius: 20px;
            transition: all 0.3s ease-in 0s; 
        }
        .onoffswitch-checkbox2:checked + .onoffswitch-label2 .onoffswitch-inner2 {
            margin-left: 0;
        }
        .onoffswitch-checkbox2:checked + .onoffswitch-label2 .onoffswitch-switch2 {
            right: 0px; 
        }
     
     
     
        .onoffswitch3 {
            position: relative; width: 90px;
            -webkit-user-select:none; -moz-user-select:none; -ms-user-select: none;
        }
        .onoffswitch-checkbox3 {
            display: none;
        }
        .onoffswitch-label3 {
            display: block; overflow: hidden; cursor: pointer;
            border: 2px solid #999999; border-radius: 20px;
        }
        .onoffswitch-inner3 {
            display: block; width: 200%; margin-left: -100%;
            transition: margin 0.3s ease-in 0s;
        }
        .onoffswitch-inner3:before, .onoffswitch-inner3:after {
            display: block; float: left; width: 50%; height: 30px; padding: 0; line-height: 30px;
            font-size: 14px; color: white; font-family: Trebuchet, Arial, sans-serif; font-weight: bold;
            box-sizing: border-box;
        }
        .onoffswitch-inner3:before {
            content: "ON";
            padding-left: 10px;
            background-color: #AED4BC; color: #FFFFFF;
        }
        .onoffswitch-inner3:after {
            content: "OFF";
            padding-right: 10px;
            background-color: #EEEEEE; color: #999999;
            text-align: right;
        }
        .onoffswitch-switch3 {
            display: block; width: 36px; margin: -3px;
            background: #FFFFFF;
            position: absolute; top: 0; bottom: 0;
            right: 56px;
            border: 2px solid #999999; border-radius: 20px;
            transition: all 0.3s ease-in 0s; 
        }
        .onoffswitch-checkbox3:checked + .onoffswitch-label3 .onoffswitch-inner3 {
            margin-left: 0;
        }
        .onoffswitch-checkbox3:checked + .onoffswitch-label3 .onoffswitch-switch3 {
            right: 0px; 
     
        }
     
     
     
        .onoffswitch4 {
            position: relative; width: 90px;
            -webkit-user-select:none; -moz-user-select:none; -ms-user-select: none;
        }
        .onoffswitch-checkbox4 {
            display: none;
        }
        .onoffswitch-label4 {
            display: block; overflow: hidden; cursor: pointer;
            border: 2px solid #999999; border-radius: 20px;
        }
        .onoffswitch-inner4 {
            display: block; width: 200%; margin-left: -100%;
            transition: margin 0.3s ease-in 0s;
        }
        .onoffswitch-inner4:before, .onoffswitch-inner4:after {
            display: block; float: left; width: 50%; height: 30px; padding: 0; line-height: 30px;
            font-size: 14px; color: white; font-family: Trebuchet, Arial, sans-serif; font-weight: bold;
            box-sizing: border-box;
        }
        .onoffswitch-inner4:before {
            content: "ON";
            padding-left: 10px;
            background-color: #AED4BC; color: #FFFFFF;
        }
        .onoffswitch-inner4:after {
            content: "OFF";
            padding-right: 10px;
            background-color: #EEEEEE; color: #999999;
            text-align: right;
        }
        .onoffswitch-switch4 {
    	display: block; width: 36px; margin: -3px;
            background: #FFFFFF;
            position: absolute; top: 0; bottom: 0;
            right: 56px;
            border: 2px solid #999999; border-radius: 20px;
            transition: all 0.3s ease-in 0s; 
        }
        .onoffswitch-checkbox4:checked + .onoffswitch-label4 .onoffswitch-inner4 {
            margin-left: 0;
        }
        .onoffswitch-checkbox4:checked + .onoffswitch-label4 .onoffswitch-switch4 {
            right: 0px; 
        }
     
     
            .onoffswitch5 {
            position: relative; width: 90px;
            -webkit-user-select:none; -moz-user-select:none; -ms-user-select: none;
        }
        .onoffswitch-checkbox5 {
            display: none;
        }
        .onoffswitch-label5 {
            display: block; overflow: hidden; cursor: pointer;
            border: 2px solid #999999; border-radius: 20px;
        }
        .onoffswitch-inner5 {
            display: block; width: 200%; margin-left: -100%;
            transition: margin 0.3s ease-in 0s;
        }
        .onoffswitch-inner5:before, .onoffswitch-inner5:after {
            display: block; float: left; width: 50%; height: 30px; padding: 0; line-height: 30px;
            font-size: 14px; color: white; font-family: Trebuchet, Arial, sans-serif; font-weight: bold;
            box-sizing: border-box;
        }
        .onoffswitch-inner5:before {
            content: "ON";
            padding-left: 10px;
            background-color: #AED4BC; color: #FFFFFF;
        }
        .onoffswitch-inner5:after {
            content: "OFF";
            padding-right: 10px;
            background-color: #EEEEEE; color: #999999;
            text-align: right;
        }
        .onoffswitch-switch5 {
         	display: block; width: 36px; margin: -3px;
            background: #FFFFFF;
            position: absolute; top: 0; bottom: 0;
            right: 56px;
            border: 2px solid #999999; border-radius: 20px;
            transition: all 0.3s ease-in 0s; 
        }
        .onoffswitch-checkbox5:checked + .onoffswitch-label5 .onoffswitch-inner5 {
            margin-left: 0;
        }
        .onoffswitch-checkbox5:checked + .onoffswitch-label5 .onoffswitch-switch5 {
            right: 0px; 
        }
     
     
     
        .onoffswitch6 {
            position: relative; width: 90px;
            -webkit-user-select:none; -moz-user-select:none; -ms-user-select: none;
        }
        .onoffswitch-checkbox6 {
            display: none;
        }
        .onoffswitch-label6 {
            display: block; overflow: hidden; cursor: pointer;
            border: 2px solid #999999; border-radius: 20px;
        }
        .onoffswitch-inner6 {
            display: block; width: 200%; margin-left: -100%;
            transition: margin 0.3s ease-in 0s;
        }
        .onoffswitch-inner6:before, .onoffswitch-inner6:after {
            display: block; float: left; width: 50%; height: 30px; padding: 0; line-height: 30px;
            font-size: 14px; color: white; font-family: Trebuchet, Arial, sans-serif; font-weight: bold;
            box-sizing: border-box;
        }
        .onoffswitch-inner6:before {
            content: "ON";
            padding-left: 10px;
            background-color: #D5FF00; color: #FFFFFF;
        }
        .onoffswitch-inner6:after {
            content: "OFF";
            padding-right: 10px;
            background-color: #EEEEEE; color: #999999;
            text-align: right;
        }
        .onoffswitch-switch6 {
            display: block; width: 36px; margin: -3px;
            background: #FFFFFF;
            position: absolute; top: 0; bottom: 0;
            right: 56px;
            border: 2px solid #999999; border-radius: 20px;
            transition: all 0.3s ease-in 0s; 
        }
        .onoffswitch-checkbox6:checked + .onoffswitch-label6 .onoffswitch-inner6 {
            margin-left: 0;
        }
        .onoffswitch-checkbox6:checked + .onoffswitch-label6 .onoffswitch-switch6 {
            right: 0px; 
        }
     
     
        .onoffswitch7 {
            position: relative; width: 90px;
            -webkit-user-select:none; -moz-user-select:none; -ms-user-select: none;
        }
        .onoffswitch-checkbox7 {
            display: none;
        }
        .onoffswitch-label7 {
            display: block; overflow: hidden; cursor: pointer;
            border: 2px solid #999999; border-radius: 20px;
        }
        .onoffswitch-inner7 {
            display: block; width: 200%; margin-left: -100%;
            transition: margin 0.3s ease-in 0s;
        }
        .onoffswitch-inner7:before, .onoffswitch-inner7:after {
            display: block; float: left; width: 50%; height: 30px; padding: 0; line-height: 30px;
            font-size: 14px; color: white; font-family: Trebuchet, Arial, sans-serif; font-weight: bold;
            box-sizing: border-box;
        }
        .onoffswitch-inner7:before {
            content: "ON";
            padding-left: 10px;
            background-color: #D5FF00; color: #FFFFFF;
        }
        .onoffswitch-inner7:after {
            content: "OFF";
            padding-right: 10px;
            background-color: #EEEEEE; color: #999999;
            text-align: right;
        }
        .onoffswitch-switch7 {
            display: block; width: 36px; margin: -3px;
            background: #FFFFFF;
            position: absolute; top: 0; bottom: 0;
            right: 56px;
            border: 2px solid #999999; border-radius: 20px;
            transition: all 0.3s ease-in 0s; 
        }
        .onoffswitch-checkbox7:checked + .onoffswitch-label7 .onoffswitch-inner7 {
            margin-left: 0;
        }
        .onoffswitch-checkbox7:checked + .onoffswitch-label7 .onoffswitch-switch7 {
            right: 0px; 
        }
     
     
        .onoffswitch8 {
            position: relative; width: 90px;
            -webkit-user-select:none; -moz-user-select:none; -ms-user-select: none;
        }
        .onoffswitch-checkbox8 {
            display: none;
        }
        .onoffswitch-label8 {
            display: block; overflow: hidden; cursor: pointer;
            border: 2px solid #999999; border-radius: 20px;
        }
        .onoffswitch-inner8 {
            display: block; width: 200%; margin-left: -100%;
            transition: margin 0.3s ease-in 0s;
        }
        .onoffswitch-inner8:before, .onoffswitch-inner8:after {
            display: block; float: left; width: 50%; height: 30px; padding: 0; line-height: 30px;
            font-size: 14px; color: white; font-family: Trebuchet, Arial, sans-serif; font-weight: bold;
            box-sizing: border-box;
        }
        .onoffswitch-inner8:before {
            content: "ON";
            padding-left: 10px;
            background-color: #9900FF; color: #FFFFFF;
        }
        .onoffswitch-inner8:after {
            content: "OFF";
            padding-right: 10px;
            background-color: #EEEEEE; color: #999999;
            text-align: right;
        }
        .onoffswitch-switch8 {
            display: block; width: 36px; margin: -3px;
            background: #FFFFFF;
            position: absolute; top: 0; bottom: 0;
            right: 56px;
            border: 2px solid #999999; border-radius: 20px;
            transition: all 0.3s ease-in 0s; 
        }
        .onoffswitch-checkbox8:checked + .onoffswitch-label8 .onoffswitch-inner8 {
            margin-left: 0;
        }
        .onoffswitch-checkbox8:checked + .onoffswitch-label8 .onoffswitch-switch8 {
            right: 0px; 
        }

    Merci à ceux qui prendrons un peu de leur temps pour m'aider !

  2. #2
    Membre émérite Avatar de vttman
    Homme Profil pro
    Développeur "couteau mosellan"
    Inscrit en
    Décembre 2002
    Messages
    1 140
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Moselle (Lorraine)

    Informations professionnelles :
    Activité : Développeur "couteau mosellan"
    Secteur : Industrie

    Informations forums :
    Inscription : Décembre 2002
    Messages : 1 140
    Points : 2 286
    Points
    2 286
    Par défaut
    J'ai pris un peu de temps pour essayer de "factoriser" le CSS
    et mettre un peu d'ordre, c'est sans doute perfectible (avis aux amateurs de CSS) mais
    ça fait une base ...

    Prendre le html et le css, sous un bon éditeur texte (Notepad++)
    et bien regarder ou refaire les indentations pour mieux voir ce que je raconte si besoin ;-)

    https://codepen.io/messinmaisoui/pen/bvwjjW
    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
    <div class ="scenrel">
    	<div class="onoffblock">
    		<div class="onoffscenar">
    			<div class="EnteteToggle">
    				<p>Scénario n°1 </p>
    			</div>
    			<input type="checkbox" name="onoffscenar1" class="onoffscenar-checkbox" id="myonoffscenar1" checked>
    			<label class="onoffscenar-label" for="myonoffscenar1">
    				<span class="onoffscenar-inner"></span>
    				<span class="onoffscenar-switch"></span>
    			</label>
    		</div>
    		<div class="onoffrelaisall">
    			<div class="EnteteToggle">
    				<p>relais n°1</p>
    			</div>
    			<div class="onoffrelais">
    				<input type="checkbox" name="relais11" class="onoffrelais-checkbox" id="relais11" NotChecked>
    				<label class="onoffrelais-label" for="relais11">
    					<span class="onoffrelais-inner"></span>
    					<span class="onoffrelais-switch"></span>
    				</label>
    			</div>
    			<div class="EnteteToggle">
    				<p>relais n°2</p>
    			</div>
    			<div class="onoffrelais">
    				<input type="checkbox" name="relais12" class="onoffrelais-checkbox" id="relais12" NotChecked>
    				<label class="onoffrelais-label" for="relais12">
    					<span class="onoffrelais-inner"></span>
    					<span class="onoffrelais-switch"></span>
    				</label>
    			</div>
    		</div>
    	</div>
    	<div class="onoffblock">
             <!--  ... Bloc suivant -->
    	</div>
    </div>

    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
    .scenrel{ 
    	display:flex;
      flex-direction: column;
    }
    .onoffblock{
    	display:flex;
      padding:5px
    }
     .onoffblock > .onoffscenar{
      border:5px green solid;
    	/*border :1px blue solid;*/
    	margin-right:15px
    }
    .EnteteToggle {
    	position: relative; width: 200px
    }
    .EnteteToggle > p{
    	margin-left:10px;
    }
     
    .onoffrelaisall{
        border:5px green dotted;
    }
    .onoffscenar {
    	position: relative; width: 174px;
      user-select: none;
    	float:left
    }
    .onoffrelais {
    	position: relative; width: 90px;
    	user-select: none;
    }
    .onoffscenar-checkbox, .onoffrelais-checkbox {
    display: none;
    }
    .onoffscenar-label {
    	display: block; overflow: hidden; cursor: pointer;
    	border: 2px solid #999999; border-radius: 6px;
    }
    .onoffrelais-label {
    	display: block; overflow: hidden; cursor: pointer;
    	border: 2px solid #999999; border-radius: 20px;
    }
    .onoffscenar-inner, .onoffrelais-inner {
    	display: block; width: 200%; margin-left: -100%;
    	transition: margin 0.3s ease-in 0s;
    }
    .onoffscenar-inner:before, .onoffscenar-inner:after,
    .onoffrelais-inner:before, .onoffrelais-inner:after {
    	display: block; float: left; width: 50%; height: 30px; padding: 0; line-height: 30px;
    	font-size: 14px; color: white; font-family: Trebuchet, Arial, sans-serif; font-weight: bold;
    	box-sizing: border-box;
    }
    .onoffscenar-inner:before {
    	content: "MANUEL";
    	padding-left: 10px;
    	background-color: #FF9100; color: #FFFFFF;
    }
    .onoffscenar-inner:after {
    	content: "AUTOMATIQUE";
    	padding-right: 10px;
    	background-color: #EEEEEE; color: #999999;
    	text-align: right;
    }
    .onoffrelais-inner:before {
    	content: "ON";
    	padding-left: 10px;
    	background-color: #34A7C1; color: #FFFFFF;
    }
    .onoffrelais-inner:after {
    	content: "OFF";
    	padding-right: 10px;
    	background-color: #EEEEEE; color: #999999;
    	text-align: right;
    }
    .onoffscenar-switch {
    	display: block; width: 35px; margin: -2.5px;
    	background: #FFFFFF;
    	position: absolute;  bottom: 0;
    	top:49px;
    	height:37px;
    	right: 140px;
    	border: 2px solid #999999; border-radius: 6px;
    	transition: all 0.3s ease-in 0s; 
    }
    .onoffrelais-switch {
    	display: block; width: 36px; margin: -3px;
    	background: #FFFFFF;
    	position: absolute; top: 0; bottom: 0;
    	right: 56px;
    	border: 2px solid #999999; border-radius: 20px;
    	transition: all 0.3s ease-in 0s; 
    }
    .onoffscenar-checkbox:checked + .onoffscenar-label .onoffscenar-inner,
    .onoffrelais-checkbox:checked + .onoffrelais-label .onoffrelais-inner {
    margin-left: 0;
    }
    .onoffscenar-checkbox:checked + .onoffscenar-label .onoffscenar-switch,
    .onoffrelais-checkbox:checked + .onoffrelais-label .onoffrelais-switch {
    right: 0px; 
    }
    Emérite, émérite je ne pense pas ... plutôt dans le développement depuis FORT FORT longtemps, c'est mon job, ça oui
    A part ça ... Il ne pleut jamais en Moselle !

  3. #3
    Nouveau membre du Club
    Profil pro
    Inscrit en
    Mai 2012
    Messages
    57
    Détails du profil
    Informations personnelles :
    Localisation : Suisse

    Informations forums :
    Inscription : Mai 2012
    Messages : 57
    Points : 36
    Points
    36
    Par défaut
    Merci !! J'ai réussi à faire la suite !

    Pour ceux que ca intéresse ou qui aurai quelques remarques pour m'aider voici le code :

    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
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
        <!doctype html>
        <html lang="fr">
            <head>
     
                <meta charset="utf-8">
                <title>Test commande GPIO</title>
     
                <link rel="stylesheet" type="text/css" href="stylesheet.css">
     
     
            </head>
            <body>
     
     
                <form action="script.php" method="post">
     
    <div class ="scenrel">
    	<div class="onoffblock">
    		<div class="onoffscenar">
     
    <!-- 1ère gamme -->
    			<div class="EnteteToggle">
    				<p>Scénario n°1 </p>
    			</div>
    			<input type="checkbox" name="onoffscenar1" class="onoffscenar-checkbox" id="myonoffscenar1" Notchecked>
    			<label class="onoffscenar-label" for="myonoffscenar1">
    				<span class="onoffscenar-inner"></span>
    				<span class="onoffscenar-switch"></span>
    			</label>
    		</div>
    		<div class="onoffrelaisall">
    			<div class="EnteteToggle">
    				<p>relais n°1</p>
    			</div>
    			<div class="onoffrelais1">
    				<input type="checkbox" name="relais1" class="onoffrelais-checkbox1" id="relais1" NotChecked>
    				<label class="onoffrelais-label1" for="relais1">
    					<span class="onoffrelais-inner1"></span>
    					<span class="onoffrelais-switch1"></span>
    				</label>
    			</div>
     
     
     
    			<div class="EnteteToggle">
    				<p>relais n°2</p>
    			</div>
    			<div class="onoffrelais1">
    				<input type="checkbox" name="relais2" class="onoffrelais-checkbox1" id="relais2" NotChecked>
    				<label class="onoffrelais-label1" for="relais2">
    					<span class="onoffrelais-inner1"></span>
    					<span class="onoffrelais-switch1"></span>
    				</label>
    			</div>
    		</div>
    	</div>
    	<div class="onoffblock">
     
    <!-- 2ème gammes -->
     
    <div class ="scenrel">
    	<div class="onoffblock">
    		<div class="onoffscenar">
    			<div class="EnteteToggle">
    				<p>Scénario n°2 </p>
    			</div>
    			<input type="checkbox" name="onoffscenar2" class="onoffscenar-checkbox" id="myonoffscenar2" Notchecked>
    			<label class="onoffscenar-label" for="myonoffscenar2">
    				<span class="onoffscenar-inner"></span>
    				<span class="onoffscenar-switch"></span>
    			</label>
    		</div>
    		<div class="onoffrelaisall">
    			<div class="EnteteToggle">
    				<p>relais n°3</p>
    			</div>
    			<div class="onoffrelais2">
    				<input type="checkbox" name="relais3" class="onoffrelais-checkbox2" id="relais3" NotChecked>
    				<label class="onoffrelais-label2" for="relais3">
    					<span class="onoffrelais-inner2"></span>
    					<span class="onoffrelais-switch2"></span>
    				</label>
    			</div>
     
     
     
    			<div class="EnteteToggle">
    				<p>relais n°4</p>
    			</div>
    			<div class="onoffrelais2">
    				<input type="checkbox" name="relais4" class="onoffrelais-checkbox2" id="relais4" NotChecked>
    				<label class="onoffrelais-label2" for="relais4">
    					<span class="onoffrelais-inner2"></span>
    					<span class="onoffrelais-switch2"></span>
    				</label>
    			</div>
     
    			<div class="EnteteToggle">
    				<p>relais n°5</p>
    			</div>
    			<div class="onoffrelais2">
    				<input type="checkbox" name="relais5" class="onoffrelais-checkbox2" id="relais5" NotChecked>
    				<label class="onoffrelais-label2" for="relais5">
    					<span class="onoffrelais-inner2"></span>
    					<span class="onoffrelais-switch2"></span>
    				</label>
    			</div>
     
     
    		</div>
    	</div>
    	<div class="onoffblock">
     
     
    <!-- 3ème gammes -->
     
    <div class ="scenrel">
    	<div class="onoffblock">
    		<div class="onoffscenar">
    	<div class="EnteteToggle">
    				<p>Scénario n°3 </p>
    			</div>
    			<input type="checkbox" name="onoffscenar3" class="onoffscenar-checkbox" id="myonoffscenar3" Notchecked>
    			<label class="onoffscenar-label" for="myonoffscenar3">
    				<span class="onoffscenar-inner"></span>
    				<span class="onoffscenar-switch"></span>
    			</label>
    		</div>
    		<div class="onoffrelaisall">
    			<div class="EnteteToggle">
    				<p>relais n°6</p>
    			</div>
    			<div class="onoffrelais3">
    				<input type="checkbox" name="relais6" class="onoffrelais-checkbox3" id="relais6" NotChecked>
    				<label class="onoffrelais-label3" for="relais6">
    					<span class="onoffrelais-inner3"></span>
    					<span class="onoffrelais-switch3"></span>
    				</label>
    			</div>
     
     
     
    			<div class="EnteteToggle">
    				<p>relais n°7</p>
    			</div>
    			<div class="onoffrelais3">
    				<input type="checkbox" name="relais7" class="onoffrelais-checkbox3" id="relais7" NotChecked>
    				<label class="onoffrelais-label3" for="relais7">
    					<span class="onoffrelais-inner3"></span>
    					<span class="onoffrelais-switch3"></span>
    				</label>
    			</div>
    		</div>
    	</div>
    	<div class="onoffblock">
     
     
    <!-- 4ème gammes -->
     
    <div class ="scenrel">
    	<div class="onoffblock">
    		<div class="onoffscenar">
    	<div class="EnteteToggle">
    				<p>Scénario n°4 </p>
    			</div>
    			<input type="checkbox" name="onoffscenar4" class="onoffscenar-checkbox" id="myonoffscenar4" Notchecked>
    			<label class="onoffscenar-label" for="myonoffscenar4">
    				<span class="onoffscenar-inner"></span>
    				<span class="onoffscenar-switch"></span>
    			</label>
    		</div>
    		<div class="onoffrelaisall">
    			<div class="EnteteToggle">
    				<p>relais n°8</p>
    			</div>
    			<div class="onoffrelais4">
    				<input type="checkbox" name="relais8" class="onoffrelais-checkbox4" id="relais8" NotChecked>
    				<label class="onoffrelais-label4" for="relais8">
    					<span class="onoffrelais-inner4"></span>
    					<span class="onoffrelais-switch4"></span>
    				</label>
    			</div>
    <!-- fin gammes -->
     
     
    	</div>
    </div>
     
     
     
                </form>
     
            </body>
        </html>


    Pour l'autre partie

    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
    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
     
    .scenrel{ 
    	display:flex;
      flex-direction: column;
    }
     
    .onoffblock{
    	display:flex;
      padding:5px
    }
     .onoffblock > .onoffscenar{
      border:5px white solid;
    	border :1px white solid;
    	margin-right:15px
    }
     
    .EnteteToggle {
    	position: relative; width: 200px
    }
    .EnteteToggle > p{
    	margin-left:10px;
    }
     
    .onoffrelaisall{
        border:5px white dotted;
    }
     
    .onoffscenar {
    	position: relative; width: 174px;
      user-select: none;
    	float:left
    }
    .onoffrelais1,.onoffrelais2,
    .onoffrelais3,.onoffrelais4 {
    	position: relative; width: 90px;
    	user-select: none;
    }
    .onoffscenar-checkbox, .onoffrelais-checkbox1,
    .onoffrelais-checkbox2,.onoffrelais-checkbox3,
    .onoffrelais-checkbox4 {
    display: none;
    }
    .onoffscenar-label {
    	display: block; overflow: hidden; cursor: pointer;
    	border: 2px solid #999999; border-radius: 6px;
    }
    .onoffrelais-label1,.onoffrelais-label2,
    .onoffrelais-label3,.onoffrelais-label4 {
    	display: block; overflow: hidden; cursor: pointer;
    	border: 2px solid #999999; border-radius: 20px;
    }
    .onoffscenar-inner, .onoffrelais-inner1, 
    .onoffrelais-inner2,.onoffrelais-inner3,
    .onoffrelais-inner4{
    	display: block; width: 200%; margin-left: -100%;
    	transition: margin 0.3s ease-in 0s;
    }
     
    .onoffscenar-inner:before, .onoffscenar-inner:after,
    .onoffrelais-inner1:before, .onoffrelais-inner1:after,
    .onoffrelais-inner2:before, .onoffrelais-inner2:after,
    .onoffrelais-inner3:before, .onoffrelais-inner3:after,
    .onoffrelais-inner4:before, .onoffrelais-inner4:after {
    	display: block; float: left; width: 50%; height: 30px; padding: 0; line-height: 30px;
    	font-size: 14px; color: white; font-family: Trebuchet, Arial, sans-serif; font-weight: bold;
    	box-sizing: border-box;
    }
    .onoffscenar-inner:before {
    	content: "MANUEL";
    	padding-left: 10px;
    	background-color: #FF9100; color: #FFFFFF;
    }
    .onoffscenar-inner:after {
    	content: "AUTOMATIQUE";
    	padding-right: 10px;
    	background-color: #EEEEEE; color: #999999;
    	text-align: right;
    }
     
     
     
    .onoffrelais-inner1:before {
    	content: "ON";
    	padding-left: 10px;
    	background-color: #3314FF; color: #FFFFFF;
    }
     
    .onoffrelais-inner2:before {
    	content: "ON";
    	padding-left: 10px;
    	background-color: #9CBCD6; color: #FFFFFF;
    }
     
    .onoffrelais-inner3:before {
    	content: "ON";
    	padding-left: 10px;
    	background-color: #F5E500; color: #FFFFFF;
    }
    .onoffrelais-inner4:before {
    	content: "ON";
    	padding-left: 10px;
    	background-color: #AB1ED6; color: #FFFFFF;
     
     
     
    }
    .onoffrelais-inner1:after,.onoffrelais-inner2:after, 
    .onoffrelais-inner3:after,.onoffrelais-inner4:after{
    	content: "OFF";
    	padding-right: 10px;
    	background-color: #EEEEEE; color: #999999;
    	text-align: right;
    }
    .onoffscenar-switch {
    	display: block; width: 35px; margin: -2.5px;
    	background: #FFFFFF;
    	position: absolute;  bottom: 0;
    	top:49px;
    	height:37px;
    	right: 140px;
    	border: 2px solid #999999; border-radius: 6px;
    	transition: all 0.3s ease-in 0s; 
    }
    .onoffrelais-switch1,.onoffrelais-switch2,
    .onoffrelais-switch3,.onoffrelais-switch4 {
    	display: block; width: 36px; margin: -3px;
    	background: #FFFFFF;
    	position: absolute; top: 0; bottom: 0;
    	right: 56px;
    	border: 2px solid #999999; border-radius: 20px;
    	transition: all 0.3s ease-in 0s; 
     
     
     
     
     
    }
    .onoffscenar-checkbox:checked + .onoffscenar-label .onoffscenar-inner,
    .onoffrelais-checkbox1:checked + .onoffrelais-label1 .onoffrelais-inner1,
     .onoffrelais-checkbox2:checked + .onoffrelais-label2 .onoffrelais-inner2,
     .onoffrelais-checkbox3:checked + .onoffrelais-label3 .onoffrelais-inner3,
     .onoffrelais-checkbox4:checked + .onoffrelais-label4 .onoffrelais-inner4{
    margin-left: 0;
    }
    .onoffscenar-checkbox:checked + .onoffscenar-label .onoffscenar-switch,
    .onoffrelais-checkbox1:checked + .onoffrelais-label1 .onoffrelais-switch1, 
    .onoffrelais-checkbox2:checked + .onoffrelais-label2 .onoffrelais-switch2,
    .onoffrelais-checkbox3:checked + .onoffrelais-label3 .onoffrelais-switch3,
    .onoffrelais-checkbox4:checked + .onoffrelais-label4 .onoffrelais-switch4{
    right: 0px; 
    }

    Mais dans tous ça j'ai toujours pas compris comment décaler sur la droite... et comment afficher mon image.. A chaque fois que je place ce bout code ca me le place l'image sous un toogle switch

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

Discussions similaires

  1. [CKEditor] Problème mise en page
    Par Death83 dans le forum Bibliothèques & Frameworks
    Réponses: 3
    Dernier message: 05/05/2006, 15h03
  2. Problème mise en page tableau
    Par brotelle dans le forum Balisage (X)HTML et validation W3C
    Réponses: 12
    Dernier message: 26/04/2006, 12h53
  3. Problème mise en page tableau avec Netscape
    Par langela94 dans le forum Balisage (X)HTML et validation W3C
    Réponses: 4
    Dernier message: 13/02/2006, 15h31
  4. [Html/Css] Problème mise en page texte
    Par Myogtha dans le forum Mise en page CSS
    Réponses: 1
    Dernier message: 07/12/2005, 15h21
  5. probléme mise en page etat
    Par Fredou1982 dans le forum Access
    Réponses: 1
    Dernier message: 16/09/2005, 17h57

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