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 :

Div enfants ne disparaissent pas lorsque l'on rend le div maitre hidden


Sujet :

JavaScript

  1. #1
    Inactif  

    Homme Profil pro
    cuisiniste
    Inscrit en
    Avril 2009
    Messages
    15 379
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Var (Provence Alpes Côte d'Azur)

    Informations professionnelles :
    Activité : cuisiniste
    Secteur : Bâtiment

    Informations forums :
    Inscription : Avril 2009
    Messages : 15 379
    Points : 12 075
    Points
    12 075
    Billets dans le blog
    8
    Par défaut Div enfants ne disparaissent pas lorsque l'on rend le div maitre hidden
    bonjour a tous
    j'ai en fin intégré mon menu div dans le wysiwyg
    avant d'etre intégré il était tout seul dans un fichier html avec ses petits a l'intérieurs

    maintenant ce div "nenudiv" et lui même enfant d'un autre div qui contient aussi le bouton pour le faire apparaitre (voir capture)
    donc dans ce divmenu on a un bouton close en haut a droite
    quand je ferme(rendre "hidden") ce div menu les divs enfants ne disparaissent pas avec lui
    j'ai bien verifié la structure html elle est bonne pas de balises mal fermées
    quelqu'un aurait une idée du pourquoi comment
    code complet du Wysiwyg
    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
    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
    437
    438
    439
    440
    441
    442
    443
    444
    445
    446
    447
    448
    449
    450
    451
    452
    453
    454
    455
    456
    457
    458
    459
    460
    461
    462
    463
    464
    465
    466
    467
    468
    469
    470
    471
    472
    473
    474
    475
    476
    477
    478
    479
    480
    481
    482
    483
    484
    485
    486
    487
    488
    489
    490
    491
    492
    493
    494
    495
    496
    497
    498
    499
    500
    501
    502
    503
    504
    505
    506
    507
    508
    509
    510
    511
    512
    513
    514
    515
    516
    517
    518
    519
    520
    521
    522
    523
    524
    525
    526
    527
    528
    529
    530
    531
    532
    533
    534
    535
    536
    537
    538
    539
    540
    541
    542
    543
    544
    545
    546
    547
    548
    549
    550
    551
    552
    553
    554
    555
    556
    557
    558
    559
    560
    561
    562
    563
    564
    565
    566
    567
    568
    569
    570
    571
    572
    573
    574
    575
    576
    577
    578
    579
    580
    581
    582
    583
    584
    585
    586
    587
    588
    589
    590
    591
    592
    593
    594
    595
    596
    597
    598
    599
    600
    601
    602
    603
    604
    605
    606
    607
    608
    609
    610
    611
    612
    613
    614
    615
    616
    617
    618
    619
    620
    621
    622
    623
    624
    625
    626
    627
    628
    629
    630
    631
    632
    633
    634
    635
    636
    637
    638
    639
    640
    641
    642
    643
    644
    645
    646
    647
    648
    649
    650
    651
    652
    653
    654
    655
    656
    657
    658
    659
    660
    661
    662
    663
    664
    665
    666
    667
    668
    669
    670
    671
    672
    673
    674
    675
    676
    677
    678
    679
    680
    681
    682
    683
    684
    685
    686
    687
    688
    689
    690
    691
    692
    693
    694
    695
    696
    697
    698
    699
    700
    701
    702
    703
    704
    705
    706
    707
    708
    709
    710
    711
    712
    713
    714
    715
    716
    717
    718
    719
    720
    721
    722
    723
    724
    725
    726
    727
    728
    729
    730
    731
    732
    733
    734
    735
    736
    737
    738
    739
    740
    741
    742
    743
    744
    745
    746
    747
    748
    749
    750
    751
    752
    753
    754
    755
    756
    757
    758
    759
    760
    761
    762
    763
    764
    765
    766
    767
    768
    769
    770
    771
    772
    773
    774
    775
    776
    777
    778
    779
    780
    781
    782
    783
    784
    785
    786
    787
    788
    789
    790
    791
    792
    793
    794
    795
    796
    797
    798
    799
    800
    801
    802
    803
    804
    805
    806
    807
    808
    809
    810
    811
    812
    813
    814
    815
    816
    817
    818
    819
    820
    821
    822
    823
    824
    825
    826
    827
    828
    829
    830
    831
    832
    833
    834
    835
    836
    837
    838
    839
    840
    841
    842
    843
    844
    845
    846
    847
    848
    849
    850
    851
    852
    853
    854
    855
    856
    857
    858
    859
    860
    861
    862
    863
    864
    865
    866
    867
    868
    869
    870
    871
    872
    873
    874
    875
    876
    877
    878
    879
    880
    881
    882
    883
    884
    885
    886
    887
    888
    889
    890
    891
    892
    893
    894
    895
    896
    897
    898
    899
    900
    901
    902
    903
    904
    905
    906
    907
    908
    909
    910
    911
    912
    913
    914
    915
    916
    917
    918
    919
    920
    921
    922
    923
    924
    925
    926
    927
    928
    929
    930
    931
    932
    933
    934
    935
    936
    937
    938
    939
    940
    941
    942
    943
    944
    945
    946
    947
    948
    949
    950
    951
    952
    953
    954
    955
    956
    957
    958
    959
    960
    961
    962
    963
    964
    965
    966
    967
    968
    969
    970
    971
    972
    973
    974
    975
    976
    977
    978
    979
    980
    981
    982
    983
    984
    985
    986
    987
    988
    989
    990
    991
    992
    993
    994
    995
    996
    997
    998
    999
    1000
    1001
    1002
    1003
    1004
    1005
    1006
    1007
    1008
    1009
    1010
    1011
    1012
    1013
    1014
    1015
    1016
    1017
    1018
    1019
    1020
    1021
    1022
    1023
    1024
    1025
    1026
    1027
    1028
    1029
    1030
    1031
    1032
    1033
    1034
    1035
    1036
    1037
    1038
    1039
    1040
    <!DOCTYPE HTML >
    <html lang="fr">
    <head>
        <!--meta charset="utf-8"-->
        <title>patrick WYSIWYG html </title>
        <meta http-equiv="X-UA-Compatible" content="IE=11">
     
        <style>
            body {
                width: 100%;
                height: 100%;
                margin-top: 0;
            }
            
            #ruban {
                min-width: 800px;
                float: left;
                margin: 0;
                HEIGHT: 70px;
                Width: 99%;
                border: 1px solid #657D89;
                background-color: #ACC3CB;
            }
            
            .CMB {
                border-radius: 4px;
                border: 1px solid #607F94;
                background-color: #E0E0E0;
                HEIGHT: 59px;
                Margin-Top: 3px;
                float: left;
                Margin-Left: 3px;
            }
            
            .palettecouleur {
                position: relative;
                font-size: 0;
                margin-top: -10px;
                HEIGHT: 224px;
                width: 145px;
                border: 1px solid #607F94;
                position: relative;
                z-index: 100;
                background-color: #ACC3CB;
            }
            
            #editeur {
                width: 99%;
                height: 650px;
                border: 1px solid black;
                overflow: auto
            }
            
            .labtitre {
                margin-top: 0;
                color: #C6F2E8;
                width: 100%;
                height: 35px;
                border: 1px solid #607F94;
                background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0) 0%, rgba(66, 137, 178, 0.65) 69%);
            }
            
            #editeur:hover .palettecouleur {
                visibility: hidden;
            }
            
            .selects {
                margin-top: -10px;
                background-color: #ACC3CB;
                position: relative;
                z-index: 23;
                width: 150px;
                font-size: 15px;
            }
            
            .rad {
                color: #086A87;
                border-radius: 4px;
                BORDER-TOP: #607f94 0.1pt solid;
                HEIGHT: 100%;
                BORDER-RIGHT: #607f94 0.1pt solid;
                WIDTH: 100%;
                BORDER-BOTTOM: #607f94 0.1pt solid;
                BORDER-LEFT: #607f94 0.1pt solid;
                background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0) 0%, rgba(149, 171, 185, 0.65) 69%);
            }
            
            .rad:hover {
                background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0) 0%, rgba(66, 137, 178, 0.65) 69%);
                color: white;
            }
            
            .Frad {
                max-HEIGHT: 26px;
                WIDTH: 26px;
                float: left;
                margin-left: 3px;
                margin-top: 2px;
                display: block;
            }
            
            .Frad:focus .palettecouleur {
                visibility: visible;
            }
            
            .btclose {
                width20px;
                height: 20px;
                background-color: gray;
                color: red;
                float: right;
                margin: 2px;
            }
            
            .btclose:hover {
                background-color: red;
                color: gray;
            }
            
            p {
                margin: 0;
            }
            
            .selects OPTION:hover {
                background-color: red;
            }
            
            .slideImpRa {
                margin: 0;
                margin-top: -35px;
                width: 300px;
                vertical-align: middle;
            }
            
            .slide {
                width: 150px;
            } //border:1px solid gray;
            #.labslide {
                width: 260px;
            }
            
            #one {
                margin-top: 0;
            }
            
            .selects2 {
                border: 1px solid white;
                background-color: #9AB9C3;
                position: relative;
                z-index: 100;
                width: 150px;
                font-size: 15px;
            }
            
            .menusup {
                position: relative;
                border: 1px solid #607F94;
                z-index: 100;
                background-color: #ACC3CB;
                border-radius: 5px;
            }
        </style>
        <script type="text/javascript">
            //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
            var ed;
            var DX, DY, oX, oY, fX, fY;
            var newparent;
            var oldparent;
            var dragged;
            var bordure;
            var code;
            var actifelem;
            var modepal;
            var storedSelections = [];
            var oldmenu;
            //typeof window.addEventListener == 'undefined' ? document.attachEvent("onmousemove",WhereMouse) : document.addEventListener('mousemove',WhereMouse,false);
            //typeof window.addEventListener == 'undefined' ? document.attachEvent("onmouseup",drag_onmouseup) : document.addEventListener('mouseup',drag_onmouseup,false);
            document.addEventListener('mousemove', WhereMouse, false);
            document.addEventListener('mouseup', drag_onmouseup, false);
            document.addEventListener('mousedown', Mdown, false);
            ////////////////////////////////////////////////////////////////////////////////////////////
            function draw(elempalid) {
                var maxlarge = document.getElementById(elempalid).offsetWidth;
                var maxheight = document.getElementById(elempalid).offsetHeight;
                document.getElementById(elempalid).setAttribute('width', maxlarge);
                document.getElementById(elempalid).setAttribute('height', maxheight)
                var ctx = document.getElementById(elempalid).getContext('2d');
                var gradient = ctx.createLinearGradient(0, 0, maxlarge, 0); ///vertical
                //var gradient = ctx.createLinearGradient(0,0,0,maxheight);//horizontal
                //var gradient = ctx.createLinearGradient(0,0,maxlarge,maxheight);//vertical oblique
                gradient.addColorStop(0, "white"); // Départ
                gradient.addColorStop(0.1, "black"); // Départ
                gradient.addColorStop(0.2, "rgb(255,100,100)"); // Intermédiaire
                gradient.addColorStop(0.3, "blue"); // Intermédiaire
                gradient.addColorStop(0.4, "magenta"); // Intermédiaire
                gradient.addColorStop(0.43, "rgb(255,150,255)"); // Intermédiaire
                gradient.addColorStop(0.47, "magenta"); // Intermédiaire
                gradient.addColorStop(0.5, "rgb(0,100,255)"); // Intermédiaire
                gradient.addColorStop(0.52, "rgb(0,100,255)"); // Intermédiaire
                gradient.addColorStop(0.53, "rgb(0,150,255)"); // Intermédiaire
                gradient.addColorStop(0.55, "rgb(0,200,255)"); // Intermédiaire
                gradient.addColorStop(0.58, "rgb(0,200,255)"); // Intermédiaire
                gradient.addColorStop(0.6, "green"); // Intermédiaire
                gradient.addColorStop(0.8, "yellow"); // Intermédiaire
                gradient.addColorStop(1, "red"); // Arrivée
                ctx.fillStyle = gradient; // Affectation au remplissage
                ctx.fillRect(0, 0, maxlarge, maxheight);
            }
            ///////////////////////////////////////////////////////////////////////////////////////////
            function getpixelcolor(e) {
                var back1 = actifelem.getAttribute("back1");
                if (back1 == null) {
                    back1 = "#FFFFFF";
                };
                var back2 = actifelem.getAttribute("back2");
                var bord1 = actifelem.getAttribute("bord1");
                if (bord1 == null) {
                    bord1 = "#000000";
                };
                var bord2 = actifelem.getAttribute("bord2");
                var percent1 = actifelem.getAttribute("percent1");
                if (percent1 == null) {
                    percent1 = "1";
                    actifelem.setAttribute('percent1', "0%");
                };
                var percent2 = actifelem.getAttribute("percent2");
                if (percent2 == null) {
                    percent2 = "1";
                    actifelem.setAttribute('percent2', "100%");
                };
                var trans1 = actifelem.getAttribute("trans1");
                if (trans1 == null) {
                    trans1 = "1";
                    actifelem.setAttribute('trans1', "1");
                };
                var trans2 = actifelem.getAttribute("trans2");
                if (trans2 == null) {
                    trans2 = "1";
                    actifelem.setAttribute('trans2', "1");
                };
                var Kanvas = document.getElementById(e.target.id)
                // alert(e.target.id +" et sa classe est  :"+ e.target.className);
                var rect = e.target.getBoundingClientRect();
                X = (e.pageX - rect.left);
                Y = e.pageY - rect.top;
                var ctx = e.target.getContext('2d');
                var c = ctx.getImageData(Math.round(X), Math.round(Y), 1, 1).data;
                var hex = "#" + ("000000" + rgbToHex(c[0], c[1], c[2])).slice(-6);
                // //////////////////pour le background          
                if (e.target.id == "palcouleur" && e.target.className == "mov" && modepal == "backgrounddiv") {
                    //back1=hex;
                    back1 = "rgba(" + c[0] + "," + c[1] + "," + c[2] + "," + "trans" + ")"
                    if (back2 == null) {
                        actifelem.style.backgroundColor = back1.replace("trans", trans1);
                        actifelem.setAttribute("back1", back1);
                    };
                    if (back2 != null) {
                        actifelem.style.background = "-ms-linear-gradient(" + "top" + "," + back1.replace("trans", trans1) + percent1 + "," + back2.replace("trans", trans2) + percent2 + ")";
                        actifelem.setAttribute("back1", back1);
                    }
                }
                if (e.target.id == "palcouleur2" && e.target.className == "mov" && modepal == "backgrounddiv") {
                    //back2=hex;
                    back2 = "rgba(" + c[0] + "," + c[1] + "," + c[2] + "," + "trans" + ")"
                    actifelem.setAttribute("back2", back2);
                    actifelem.style.background = "-ms-linear-gradient(" + "top" + "," + back1.replace("trans", trans1) + percent1 + "," + back2.replace("trans", trans2) + percent2 + ")";
                }
                //if (e.target.id=="palcouleur" && e.target.className=="mov" && modepal=="bordercolor"){actifelem.style.borderColor=hex;actifelem.setAttribute("bord1",hex);}
                //if ( e.target.id=="palcouleur2" && e.target.className=="mov" && modepal=="bordercolor"){actifelem.style.borderColor=hex;actifelem.setAttribute("bord2",hex);}
                /////////////////////////FINI POUR LE BACKGROUND           
                /////////////////POUR LES BORDURES
                if (e.target.id == "palcouleur" && e.target.className == "mov" && modepal == "bordercolor") {
                    bord1 = hex;
                    if (bord2 == null) {
                        actifelem.style.borderColor = hex;
                        actifelem.setAttribute("bord1", hex);
                    };
                    if (bord2 != null) {
                        actifelem.style.borderImage = "-ms-linear-gradient(" + "top" + "," + bord1 + "," + bord2 + "," + bord1 + ") 1 100%";
                        actifelem.setAttribute("bord1", hex);
                    }
                }
                if (e.target.id == "palcouleur2" && e.target.className == "mov" && modepal == "bordercolor") {
                    bord2 = hex;
                    actifelem.setAttribute("bord2", hex);
                    actifelem.style.borderImage = "-ms-linear-gradient(" + bord1 + "," + bord2 + ")" + actifelem.style.borderWidth.replace("px", "");
                    //code en CSS exemple =border-image:linear-gradient(to bottom, black, rgba(0, 0, 0, 0)) 1 100%;
                    //border-image: linear-gradient(red, yellow) 10;
                }
                /////////////////FINI POUR LES BORDURES
     
            }
     
            ///////////////////////////////FIN DU GETPIXELCOLOR////////////////////////////////////////
            //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////FONCTION QUI DEMARRE LE DRAG //////////////////////////////////////////////////////////
            function rgbToHex(r, g, b) {
                if (r > 255 || g > 255 || b > 255)
                    throw "Invalid color component";
                return ((r << 16) | (g << 8) | b).toString(16);
            }
            /////////////////////////////////////////////////////TRANSPARENCE///////////////////////////////////////////////////////////////////////////////////////////////////FONCTION QUI DEMARRE LE DRAG //////////////////////////////////////////////////////////
            function transparence(e) {
                if (actifelem.getAttribute("back1") != null) {
                    if (e.target.id == "transp1") {
                        actifelem.setAttribute("trans1", e.target.value / 100);
                        var back1 = actifelem.getAttribute("back1").replace("trans", e.target.value / 100);
                        var percent1 = actifelem.getAttribute("percent1");
                        var back2 = actifelem.getAttribute("back2");
                        var trans2 = actifelem.getAttribute("trans2");
                        if (back2 != null) {
                            back2 = actifelem.getAttribute("back2").replace("trans", trans2);
                            actifelem.style.background = "-ms-linear-gradient(" + "top" + "," + back1 + percent1 + "," + back2 + "100%" + ")";
                        };
                        if (back2 == null) {
                            actifelem.style.backgroundColor = back1;
                        };
                    }; //fin du if back1
                    if (e.target.id == "transp2") {
                        if (actifelem.getAttribute("back2") != null) {
                            actifelem.setAttribute("trans2", e.target.value / 100);
                            var back2 = actifelem.getAttribute("back2").replace("trans", e.target.value / 100);
                            var back1 = actifelem.getAttribute("back1").replace("trans", actifelem.getAttribute("trans1"));
                            var percent1 = actifelem.getAttribute("percent1");
     
                            //alert("-ms-linear-gradient("+"top" + "," +back1+ percent1 +","+back2+percent2+")");
                            actifelem.style.background = "-ms-linear-gradient(" + "top" + "," + back1 + percent1 + "," + back2 + "100%" + ")";
                        } else {
                            e.target.value = "100";
                        }
                    }; //fin du if back2
                }
            }
            //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////FONCTION QUI DEMARRE LE DRAG //////////////////////////////////////////////////////////
            function Mdown() {
                //alert(document.activeElement.outerHTML);
                if (document.activeElement.className == "divint") {
                    actifelem = document.activeElement;
                }
            }
            //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////FONCTION QUI DEMARRE LE DRAG //////////////////////////////////////////////////////////
            function pourcentage(e) {
                if (actifelem.getAttribute("back2") != null) {
                    actifelem.setAttribute("percent1"), e.target.value + "%";
                    var back2 = actifelem.getAttribute("back2").replace("trans", actifelem.getAttribute("trans1"));
                    var back1 = actifelem.getAttribute("back1").replace("trans", actifelem.getAttribute("trans2"));
                    actifelem.style.background = "-ms-linear-gradient(" + "top" + "," + back1 + e.target.value + "%" + "," + back2 + "100%" + ")";
                } else {
                    e.target.value = "0";
                }
            }
            function supprback2(e) {
                var trans1 = actifelem.getAttribute("trans1");
                var back1 = actifelem.getAttribute("back1").replace("trans", "100");
                actifelem.style.background = "none";
                actifelem.backgroundColor = back1;
                actifelem.removeAttribute("back2");
                actifelem.removeAttribute("trans2");
                document.getElementById("transp1").focus
                document.getElementById("transp1").value = 100;
            }
            //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////FONCTION QUI DEMARRE LE DRAG //////////////////////////////////////////////////////////
            function putbackimage(e) {
                var f = document.getElementById("fichier"); // fichier est un input type texte
                f.click();
                var chemin = f.value.replace(/\\/gi, "\\\\");
                actifelem.style.background = "none";
                actifelem.style.backgroundImage = "url(\"" + chemin + "\")";
                actifelem.style.backgroundSize = actifelem.style.width + " " + actifelem.style.height;
                actifelem.removeAttribute("back1");
                actifelem.removeAttribute("back2");
                actifelem.removeAttribute("trans1");
                actifelem.removeAttribute("trans2")
                actifelem.removeAttribute("percent1");
                actifelem.removeAttribute("percent2");
            }
            //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////FONCTION QUI DEMARRE LE DRAG //////////////////////////////////////////////////////////
     
            //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////FONCTION QUI DEMARRE LE DRAG //////////////////////////////////////////////////////////
            function dragstart(ev) {
                ev = ev || event;
                target = ev.target || ev.srcElement;
                if (target.tagName == "DIV" || target.tagName == "IMG") {
     
                    dragged = target;
                    bordure = dragged.style.border;
                    oldparent = dragged.parentElement;
                    dragged.style.border = "2px dotted #8258FA";
                    fX = ev.offsetX;
                    fY = ev.offsetY;
                    X = ev.clientX + (document.documentElement.scrollLeft + document.body.scrollLeft);
                    Y = ev.clientY + (document.documentElement.scrollTop + document.body.scrollTop);
                    DX = 0;
                    DY = 0;
                    DX = X - dragged.offsetLeft;
                    DY = Y - dragged.offsetTop;
                    ev.stopPropagation();
                    ev.returnValue = false;
                    if (ev.preventDefault) ev.preventDefault();
                } else {
                    dragged = null;
                    ev.returnValue = false;
                }
            } ///////////////////////////////////////////////////////////////////////////////////
            ///////////////////////////////////////////////////////////////////FONCTION QUI DEPLACE LE DIV //////////////////////////////////////////////////////////////
            function WhereMouse(ev)
            {
                if (dragged != null) {
                    Mouse_X = ev.clientX + (document.documentElement.scrollLeft + document.body.scrollLeft);
                    Mouse_Y = ev.clientY + (document.documentElement.scrollTop + document.body.scrollTop);
                    Mouse_X -= DX;
                    Mouse_Y -= DY;
                    if (Mouse_Y < 120 && dragged.parentElement.id == "editeur") {
                        Mouse_Y = 120;
                    }
                    dragged.style.position = "absolute";
                    dragged.style.left = Mouse_X + 'px';
                    dragged.style.top = Mouse_Y + 'px';
                }
            }
            //********************************************************************************************************************************
            ///////////////////////////////////////////////////////////////////
            //////////////////////////////////////////////////////////////////////////////////////////////
            function drag_onmouseup(ev) {
                if (dragged != null) {
                    actifelem = dragged;
                    dragged.style.border = bordure;
                    var rect = dragged.getBoundingClientRect();
                    oX = rect.left;
                    oY = rect.top;
                    var oXX = rect.right;
                    var oYY = rect.bottom;
                    newparent = document.getElementById("editeur");
                    lesdiv = document.getElementsByClassName("divint");
                    for (var i = 0; i < lesdiv.length; i++) {
                        if (lesdiv[i].id != dragged.id) {
                            var rect2 = lesdiv[i].getBoundingClientRect();
                            var oX2 = rect2.left;
                            var oY2 = rect2.top;
                            var oXX2 = rect2.right;
                            var oYY2 = rect2.bottom;
                            if (oX2 < oX && oXX2 > oXX && oY2 < oY && oYY2 > oYY) {
                                newparent = lesdiv[i];
                            }
                        }
                    }
                    var rect2 = newparent.getBoundingClientRect();
                    var oX2 = rect2.left;
                    var oY2 = rect2.top;
                    var oXX2 = rect2.right;
                    var oYY2 = rect2.bottom;
     
                    if (newparent.id != oldparent.id) {
                        var rect = dragged.getBoundingClientRect();
                        oX = rect.left;
                        oY = rect.top;
                        var oXX = rect.right;
                        var oYY = rect.bottom;
                        newparent.appendChild(dragged);
                        dragged.style.left = oX - oX2 + "px";
                        dragged.style.top = oY - oY2 + "px";
                        if (newparent.id == "editeur") {
                            dragged.style.left = oX + "px";
                            dragged.style.top = oY + "px";
                        }
                    }
                }
                dragged = null;
                oldparent = null;
                newparent = null;
            } //On arrête le drag}
     
            ///////////////////////////////////////////////////////////////////////////////////////////////
     
            function selectionne_text() {
                return window.getSelection().getRangeAt(0);
            }
            ////////////////////////////////////////////////////////////////////////////////
            function execom(fonct, argument1, argument2) {
                if (argument1 == "undefined") {
                    argument1 = false;
                }
                if (argument2 == "undefined") {
                    argument2 = Null;
                }
                document.execCommand(fonct, argument1, argument2);
            }
            ////////////////////////////////////////////////////////////////////////////////////
            function shadowcolor(coul, MOD) {
                if (selectionne_text()) {
                    var selection = selectionne_text();
                    var selectedText = selection.extractContents();
                    var balisefont = document.createElement("FONT");
                    balisefont.appendChild(selectedText);
                    var colhtml = balisefont.getElementsByTagName("FONT");
                    if (colhtml.length > 0) {
                        for (var i = 0; i < colhtml.length; i++) {
                            if (colhtml[i].className = "shado") {
                                colhtml[i].style.textShadow = "none";
                                colhtml[i].className = "";
                            }
     
                        }
                    }
                    var str = balisefont.innerHTML;
                    for (var e = 0; e < 10; e++) {
                        str = str.replace(" style=\"text-shadow: none;\"", "");
                        str = str.replace("text-shadow: none;", "");
                        str = str.replace("style=\"\"", "");
                        str = str.replace("</font><font>", "")
                    }
                    balisefont.innerHTML = str
                    if (MOD == true) {
                        balisefont.style.textShadow = "0px 0px 10px " + coul;
                    }
                    selection.insertNode(balisefont);
                } // FIN DE   IF selectionne_text
            } //fin de fonction shado
            //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
            function impression() {
                var zone;
                var fen = window.open("", "", "height=500, width=600,toolbar=0, menubar=0, scrollbars=1, resizable=1,status=0, location=0, left=10, top=10");
                fen.document.title = "Impression du document";
                zone = document.getElementById("editeur").innerHTML;
                fen.document.body.innerHTML += " " + zone + " ";
                fen.window.print();
                fen.window.close();
                fen.close();
                return true;
            }
            ///////////////////////////////////////////////////////////////////////////////////////////
            function saveas() {
                var oPrntWin = window.open("", "_blank", "width=1,height=1,left=1,top=1,menubar=yes,toolbar=yes,resizable=yes,location=no,scrollbars=yes");
                oPrntWin.document.open();
                oPrntWin.document.write(editeur.innerHTML);
                oPrntWin.document.execCommand("SaveAs", true, "C:\\My Documents\\entrez un nom ici.html");
                oPrntWin.document.close();
            }
            ////////////////////////////////////////////////////////////////////////////////////////////
     
            function visible(elem) {
                document.getElementById(elem).style.visibility = "visible";
                document.getElementById(elem).style.zIndex = document.all.length - 1;
            }
            /////////////////////////////////////////////////////////////////////////       
            function insertimg() {
                try {
                    var fichier = document.getElementById("fichier")
                    fichier.click();
                    var Data = fichier.value;
     
                    if (Data != "") {
                        var ids = "image" + document.getElementsByTagName("img").length + 1;
                        var selection = selectionne_text();
                        var selectedText = selection.extractContents();
                        var baliseimg = document.createElement("img");
                        baliseimg.appendChild(selectedText);
                        baliseimg.src = Data;
                        baliseimg.id = ids;
                        baliseimg.className = "image";
     
                        baliseimg.onDragStart = "return false";
                        baliseimg.onMouseDown = "return false";
                        selection.insertNode(baliseimg);
                        document.getElementById(ids).width = 300;
                        ///if (document.getElementById(ids).parentElement.id !="editeur"){document.getElementById("editeur").appendChild(document.getElementById(ids));}
                        document.getElementById(ids).addEventListener("dragstart", dragstart, false);
                    }
                } catch (e) {
                    alert("Vous devez vous placer sur l'éditeur!");
                };
            }
     
            /////////////////////////////////////////////////////////////////////////////////
            /////////////////////////////////////////////////////////////////////////////////////////////////////
            function insertdiv() {
                var divid = "div" + document.getElementsByTagName("div").length;
                var ed = document.getElementById('editeur');
                var selection = selectionne_text();
                var selectedText = selection.extractContents();
                var balise = document.createElement('div');
                balise.style.borderRadius = "6%";
                balise.style.border = "1px solid black";
                balise.style.width = "200px";
                balise.style.height = "200px";
                balise.className = "divint";
                balise.id = divid;
                //balise.Style.WordWrap = "break-word";
                actifelem = balise;
                //si il y a du texte sélectionné  on englobe le texte avec le div             
                if (selection.length != 0) {
                    balise.appendChild(selectedText);
                    selection.insertNode(balise);
                }
                //si on englobe pas du texte le div est hors du flux (absolute )
                if (selection == "") {
                    balise.style.position = "absolute";
                    balise.appendChild(document.createElement('p'));
                    ed.appendChild(balise);
                }
                ed.appendChild(document.createElement('p'));
                document.getElementById(divid).addEventListener("dragstart", dragstart, false);
                document.getElementById(divid).style.zIndex = "30"
            }
            /////////////////////////////////////////////////////////////////////////////////////////////////////////
            function initialisation() {
                alert("initialisation")
                draw("palcouleur");
                draw("palcouleur2");
                document.getElementById("transp1").addEventListener("change", transparence, false);
                document.getElementById("transp2").addEventListener("change", transparence, false);
                document.getElementById("pourcent").addEventListener("change", pourcentage, false);
                document.getElementById("supback2").addEventListener("click", supprback2, false);
                document.getElementById("backimage").addEventListener("click", putbackimage, false);
                document.getElementById('palcouleur').addEventListener("mousemove", getpixelcolor, false);
                document.getElementById("palcouleur").addEventListener("mousedown", function() {
                    this.className = "mov";
                });
                document.getElementById("palcouleur").addEventListener("mouseup", function() {
                    this.className = "nomov";
                });
                document.getElementById('palcouleur2').addEventListener("mousemove", getpixelcolor, false);
                document.getElementById("palcouleur2").addEventListener("mousedown", function() {
                    this.className = "mov";
                });
                document.getElementById("palcouleur2").addEventListener("mouseup", function() {
                    this.className = "nomov";
                });
     
                document.getElementById("bordercolor").addEventListener("click", function() {
                    modepal = "bordercolor";
                    if (oldmenu != null) {
                        oldmenu.style.visibility = "hidden";
                    };
                    oldmenu = document.getElementById("menupal");
                    oldmenu.style.visibility = "visible";
                });
                document.getElementById("backcouleurdiv").addEventListener("click", function() {
                    modepal = "backgrounddiv";
                    if (oldmenu != null) {
                        oldmenu.style.visibility = "hidden";
                    };
                    oldmenu = document.getElementById("menupal");
                    oldmenu.style.visibility = "visible";
                });
     
                ////////////////////////////////////////////////////////////////////////////////////////////////evenement menu coin 
                document.getElementById("coin").addEventListener("click", function() {
                    if (oldmenu != null) {
                        oldmenu.style.visibility = "hidden";
                    };
                    oldmenu = document.getElementById("menucoin");
                    oldmenu.style.visibility = "visible";
                });
                document.getElementById("slidebordhg").addEventListener("change", function() {
                    if (actifelem != null) {
                        actifelem.style.borderTopLeftRadius = this.value + "%";
                    };
                });
                document.getElementById("slidebordhd").addEventListener("change", function() {
                    if (actifelem != null) {
                        actifelem.style.borderTopRightRadius = this.value + "%";
                    };
                });
                document.getElementById("slidebordbg").addEventListener("change", function() {
                    if (actifelem != null) {
                        actifelem.style.borderBottomLeftRadius = this.value + "%";
                    };
                });
                document.getElementById("slidebordbd").addEventListener("change", function() {
                    if (actifelem != null) {
                        actifelem.style.borderBottomRightRadius = this.value + "%";
                    };
                });
                document.getElementById("slidebordfour").addEventListener("change", function() {
                    if (actifelem != null) {
                        actifelem.style.borderRadius = this.value + "%";
                    };
                });
                ///////////////////////////////////////////////////////////////////////////////////////////////////fin du menu coin
     
                document.getElementById("borderwidth").addEventListener("click", function() {
                    if (oldmenu != null) {
                        oldmenu.style.visibility = "hidden";
                    };
                    oldmenu = document.getElementById("menuborderwidth");
                    oldmenu.style.visibility = "visible";
                    oldmenu.zIndex = 100;
                    document.getElementById("slidebordwidth").value = Math.round(actifelem.style.borderWidth.replace("px", ""));
                });
                document.getElementById("slidebordwidth").addEventListener("change", function() {
                    if (actifelem != null) {
                        actifelem.style.borderWidth = this.value + "px";
                    };
                });
     
     
                document.getElementById("bold").addEventListener("click", function() {
                    execom("bold");
                });
                document.getElementById("italic").addEventListener("click", function() {
                    execom(this.id);
                });
                document.getElementById("underline").addEventListener("click", function() {
                    execom(this.id);
                });
                document.getElementById("Strikethrough").addEventListener("click", function() {
                    execom(this.id);
                });
                document.getElementById("insertunorderedlist").addEventListener("click", function() {
                    execom(this.id);
                });
                document.getElementById("insertorderedlist").addEventListener("click", function() {
                    execom(this.id);
                });
                document.getElementById("justifyleft").addEventListener("click", function() {
                    execom(this.id);
                });
                document.getElementById("justifycenter").addEventListener("click", function() {
                    execom(this.id);
                });
                document.getElementById("justifyright").addEventListener("click", function() {
                    execom(this.id);
                });
                document.getElementById("indent").addEventListener("click", function() {
                    execom(this.id);
                });
                document.getElementById("outdent").addEventListener("click", function() {
                    execom(this.id);
                });
                document.getElementById("RemoveFormat").addEventListener("click", function() {
                    execom(this.id);
                });
     
                document.getElementById("impression").addEventListener("click", function() {
                    impression();
                });
                document.getElementById("insertimg").addEventListener("click", function() {
                    insertimg();
                });
                var btclose = document.getElementsByClassName("btclose");
                for (var i = 0; i < btclose.length; i++) {
                    btclose[i].addEventListener("click", function() {
                        this.parentElement.style.visibility = "hidden";
                    });
                }
                document.getElementById("suppcouleur").addEventListener("click", function() {
                    document.getElementById("palette").style.visibility = "hidden";
                    if (modepal == "forecolor") {
                        execom(modepal, false);
                    }
                    if (modepal == "backcolor") {
                        execom(modepal, false);
                    }
                    if (modepal == "shadowcolor") {
                        shadowcolor("#" + this.id, false);
                    }
                });
     
                //evenement pour le bouton listezize
                document.getElementById("sizeFont").addEventListener("click", function() {
                    visible("listsizes");
                });
                var L = document.getElementById("listsizes");
                L.addEventListener("mouseout", function() {
                    this.style.visibility = "hidden";
                });
                for (var i = 0; i < L.children.length; i++) {
                    L.children[i].addEventListener("click", function() {
                        this.parentElement.style.visibility = "hidden";
                        execom("fontsize", false, this.innerText);
                    });
                    L.children[i].addEventListener("mouseover", function() {
                        this.parentElement.style.visibility = "visible";
                    });
                }
                document.getElementById("fontname").addEventListener("click", function() {
                    visible("listfonts");
                });
                var L = document.getElementById("listfonts")
                L.addEventListener("mouseout", function() {
                    this.style.visibility = "hidden";
                });
                for (var i = 0; i < L.children.length; i++) {
                    L.children[i].style.fontFamily = L.children[i].innerText;
                    L.children[i].addEventListener("click", function() {
                        this.parentElement.style.visibility = "hidden";
                        execom("fontname", false, this.innerText);
                    });
                    L.children[i].addEventListener("mouseover", function() {
                        this.parentElement.style.visibility = "visible";
                    });
                }
                document.getElementById("formatBlock").addEventListener("click", function() {
                    visible("listH");
                });
                var L = document.getElementById("listH")
                L.addEventListener("mouseout", function() {
                    this.style.visibility = "hidden";
                });
                for (var i = 0; i < L.children.length; i++) {
                    L.children[i].addEventListener("click", function() {
                        this.parentElement.style.visibility = "hidden";
                        execom("formatBlock", false, this.innerText);
                    });
                    L.children[i].addEventListener("mouseover", function() {
                        this.parentElement.style.visibility = "visible";
                    });
                }
                document.getElementById("forecolor").addEventListener("click", function() {
                    modepal = "forecolor";
                    visible("palette");
                });
                document.getElementById("backcolor").addEventListener("click", function() {
                    modepal = "backcolor";
                    visible("palette");
                });
                document.getElementById("shadowcolor").addEventListener("click", function() {
                    modepal = "shadowcolor";
                    visible("palette");
                });
     
     
                var L = document.getElementById("palette")
                //L.addEventListener("mouseout",function(){this.style.visibility="hidden";});
                for (var i = 0; i < L.children.length; i++) {
                    if (L.children[i].className != "rad") {
                        L.children[i].addEventListener("click", function() {
                            document.getElementById("palette").style.visibility = "hidden";
                            if (modepal == "forecolor") {
                                execom(modepal, false, "#" + this.id);
                            }
                            if (modepal == "backcolor") {
                                execom(modepal, false, "#" + this.id);
                            }
                            if (modepal == "shadowcolor") {
                                shadowcolor("#" + this.id, true);
                            }
                        });
                        L.children[i].addEventListener("mouseover", function() {
                            this.parentElement.style.visibility = "visible";
                        });
                    }
                }
                document.getElementById("ajoutdivmenu").addEventListener("click", function() {
                    visible("menudivmenu");
                });
                document.getElementById("ajoutdiv").addEventListener("click", function() {
                    insertdiv();
                });
                ajoutdiv
     
                adddragtodiv();
            } //fin de fonction init  
            ////////////////////////////////////////////////
     
            function adddragtodiv() {
                var Element = document.all;
                for (var i = 0; i < Element.length; i++) {
                    if (Element[i].tagName == "DIV" || Element[i].tagName == "IMG") {
                        Element[i].addEventListener("dragstart", dragstart, false);
                    }
                }
            }
            ///////////////////////////////////////////////////////////////////////////////////
            //********************************
        </script>
    </head>
    <body>
        <input id="fichier" style="height: 1px;" type="file">
        <div id="ruban">
            <div class="CMB" id="barre0" style="width: 210px;">
                <div class="Frad" id="fradbold"><img title="Mettre le texte en gras" class="rad" id="bold" src="C:/Users/polux/Desktop/BOUTON WIG/bold.gif"></div>
                <div class="Frad" id="fraditalic"><img title="mettre le texte en italique" class="rad" id="italic" src="C:/Users/polux/Desktop/BOUTON WIG/italic.gif"></div>
                <div class="Frad" id="fradunderline"><img title="Souligner le texte" class="rad" id="underline" src="C:/Users/polux/Desktop/BOUTON WIG/underline.gif"></div>
                <div class="Frad" id="fradStrikethrough"><img title="Barrer le texte" class="rad" id="Strikethrough" src="C:/Users/polux/Desktop/BOUTON WIG/strike.gif"></div>
                <div class="Frad" id="fradFontsize"><img title="Changer la taille de la police" class="rad" id="sizeFont" src="C:/Users/polux/Desktop/BOUTON WIG/fontsize.gif">
                    <div class="selects" id="listsizes" style="overflow:auto;visibility:hidden;width:60px;height:100px;">
                        <button class="rad" style="height:20px;width:100%; ">1</button>
                        <button class="rad" style="height:20px;width:100%; ">2</button>
                        <button class="rad" style="height:20px;width:100%; ">3</button>
                        <button class="rad" style="height:20px;width:100%; ">4</button>
                        <button class="rad" style="height:20px;width:100%; ">5</button>
                        <button class="rad" style="height:20px;width:100%; ">6</button>
                        <button class="rad" style="height:20px;width:100%; ">7</button>
                    </div>
     
                </div>
     
                <div class="Frad" id="fradfontname"><img title="changer la police de caractere" class="rad" id="fontname" src="C:/Users/polux/Desktop/BOUTON WIG/font.gif">
                    <div class="selects" id="listfonts" style="visibility: hidden;width:200px;height:200px;overflow:auto">
                        <Button class="rad" style="width100%;height:25px;">Font Name</Button>
                        <Button class="rad" style="width100%;height:25px;">Arial</Button>
                        <Button class="rad" style="width100%;height:25px;">Aharoni</Button>
                        <Button class="rad" style="width100%;height:25px;">Arial Black</Button>
                        <Button class="rad" style="width100%;height:25px;">Arial Narrow</Button>
                        <Button class="rad" style="width100%;height:25px;">Algerian</Button>
                        <Button class="rad" style="width100%;height:25px;">Broadway</Button>
                        <Button class="rad" style="width100%;height:25px;">Berlin Sans FB Demi</Button>
                        <Button class="rad" style="width100%;height:25px;">Calibri</Button>
                        <Button class="rad" style="width100%;height:25px;">Calligraph421 BT</Button>
                        <Button class="rad" style="width100%;height:25px;">Castellar</Button>
                        <Button class="rad" style="width100%;height:25px;">Comic Sans MS</Button>
                        <Button class="rad" style="width100%;height:25px;">Copperplate Gothic Bold</Button>
                        <Button class="rad" style="width100%;height:25px;">Courier</Button>
                        <Button class="rad" style="width100%;height:25px;">Georgia</Button>
                        <Button class="rad" style="width100%;height:25px;">Goudy Stout</Button>
                        <Button class="rad" style="width100%;height:25px;">Harlow Solid Italic</Button>
                        <Button class="rad" style="width100%;height:25px;">Helvetica</Button>
                        <Button class="rad" style="width100%;height:25px;">Impact</Button>
                        <Button class="rad" style="width100%;height:25px;">Informal Roman</Button>
                        <Button class="rad" style="width100%;height:25px;">Lucida Calligraphy</Button>
                        <Button class="rad" style="width100%;height:25px;">MS Sans Serif</Button>
                        <Button class="rad" style="width100%;height:25px;">Milano LET</Button>
                        <Button class="rad" style="width100%;height:25px;">Rockwell Extra Bold</Button>
                        <Button class="rad" style="width100%;height:25px;">Script MT Bold</Button>
                        <Button class="rad" style="width100%;height:25px;">Segoe Script</Button>
                        <Button class="rad" style="width100%;height:25px;">Verdana</Button>
                        <Button class="rad" style="width100%;height:25px;">Tahoma</Button>
                        <Button class="rad" style="width100%;height:25px;">Trebuchet MS</Button>
                        <Button class="rad" style="width100%;height:25px;">Victorian LET</Button>
                    </div>
                </div>
                <div class="Frad" id="fradformatBlock"><img title="Insérer une balise Titre" class="rad" id="formatBlock" src="C:/Users/polux/Desktop/BOUTON WIG/formatblock.gif">
     
                    <div class="selects" id="listH" style="visibility: hidden;width 60px;height:100px;overflow:auto;">
                        <Button class="rad" style="width:100%;height:25px;">normal</Button>
                        <Button class="rad" style="width:100%;height:25px;">&lt;h1&gt;</Button>
                        <Button class="rad" style="width:100%;height:25px;">&lt;h2&gt;</Button>
                        <Button class="rad" style="width:100%;height:25px;">&lt;h3&gt;</Button>
                        <Button class="rad" style="width:100%;height:25px;">&lt;h4&gt;</Button>
                        <Button class="rad" style="width:100%;height:25px;">&lt;h5&gt;</Button>
                        <Button class="rad" style="width:100%;height:25px;">&lt;h6&gt;</Button>
                    </div>
                </div>
                <div class="Frad" id="fradjustifyleft"><img title="Aligner  le texte a Gauche" class="rad" id="justifyleft" src="C:/Users/polux/Desktop/BOUTON WIG/justifyleft.gif"></div>
                <div class="Frad" id="fradjustifycenter"><img title="Aligner le texte au Centre" class="rad" id="justifycenter" src="C:/Users/polux/Desktop/BOUTON WIG/justifycenter.gif"></div>
                <div class="Frad" id="fradjustifyright"><img title="Aligner le texte a Droite" class="rad" id="justifyright" src="C:/Users/polux/Desktop/BOUTON WIG/justifyright.gif"></div>
                <div class="Frad" id="fradindent"><img title="Augmenter l'indentaion" class="rad" id="indent" src="C:/Users/polux/Desktop/BOUTON WIG/indent.gif"></div>
                <div class="Frad" id="fradoutdent"><img title="Diminuer l'indentation" class="rad" id="outdent" src="C:/Users/polux/Desktop/BOUTON WIG/outdent.gif"></div>
                <div class="Frad" id="fradinsertunorderedlist"><img title="Insérer une Liste a Puce" class="rad" id="insertunorderedlist" src="C:/Users/polux/Desktop/BOUTON WIG/insertunorderedlist.gif"></div>
                <div class="Frad" id="fradinsertorderedlist"><img title="Insérer une Liste  Numérotée" class="rad" id="insertorderedlist" src="C:/Users/polux/Desktop/BOUTON WIG/insertorderedlist.gif"></div>
            </div>
            <div class="CMB" id="barre1" style="width: 60px;">
                <div class="Frad" id="fradforecolor"><img title="Changer la couleur du texte" class="rad" id="forecolor" src="C:/Users/polux/Desktop/BOUTON WIG/color.gif">
                    <div class="palettecouleur" id="palette" style="visibility: hidden; z-index: 1;">
                        <button class="rad" id="suppcouleur" style="width: 100%; height: 30px;">supprimer la couleur</button>
                        <button id="000000" style="margin: 2px; border: 0px currentColor; border-image: none; width: 14px; height: 15px; background-color: rgb(0, 0, 0);"></button>
                        <button id="FFFFFF" style="margin: 2px; border: 0px currentColor; border-image: none; width: 14px; height: 15px; background-color: rgb(255, 255, 255);"></button><button id="FF0000" style="margin: 2px; border: 0px currentColor; border-image: none; width: 14px; height: 15px; background-color: rgb(255, 0, 0);"></button><button id="00FF00" style="margin: 2px; border: 0px currentColor; border-image: none; width: 14px; height: 15px; background-color: rgb(0, 255, 0);"></button><button id="0000FF" style="margin: 2px; border: 0px currentColor; border-image: none; width: 14px; height: 15px; background-color: rgb(0, 0, 255);"></button><button id="FFFF00" style="margin: 2px; border: 0px currentColor; border-image: none; width: 14px; height: 15px; background-color: rgb(255, 255, 0);"></button><button id="FF00FF" style="margin: 2px; border: 0px currentColor; border-image: none; width: 14px; height: 15px; background-color: rgb(255, 0, 255);"></button><button id="00FFFF" style="margin: 2px; border: 0px currentColor; border-image: none; width: 14px; height: 15px; background-color: rgb(0, 255, 255);"></button><button id="800000" style="margin: 2px; border: 0px currentColor; border-image: none; width: 14px; height: 15px; background-color: rgb(128, 0, 0);"></button><button id="008000" style="margin: 2px; border: 0px currentColor; border-image: none; width: 14px; height: 15px; background-color: rgb(0, 128, 0);"></button><button id="000080" style="margin: 2px; border: 0px currentColor; border-image: none; width: 14px; height: 15px; background-color: rgb(0, 0, 128);"></button><button id="808000" style="margin: 2px; border: 0px currentColor; border-image: none; width: 14px; height: 15px; background-color: rgb(128, 128, 0);"></button><button id="800080" style="margin: 2px; border: 0px currentColor; border-image: none; width: 14px; height: 15px; background-color: rgb(128, 0, 128);"></button><button id="008080" style="margin: 2px; border: 0px currentColor; border-image: none; width: 14px; height: 15px; background-color: rgb(0, 128, 128);"></button><button id="C0C0C0" style="margin: 2px; border: 0px currentColor; border-image: none; width: 14px; height: 15px; background-color: rgb(192, 192, 192);"></button><button id="808080" style="margin: 2px; border: 0px currentColor; border-image: none; width: 14px; height: 15px; background-color: rgb(128, 128, 128);"></button><button id="9999FF" style="margin: 2px; border: 0px currentColor; border-image: none; width: 14px; height: 15px; background-color: rgb(153, 153, 255);"></button><button id="993366" style="margin: 2px; border: 0px currentColor; border-image: none; width: 14px; height: 15px; background-color: rgb(153, 51, 102);"></button><button id="FFFFCC" style="margin: 2px; border: 0px currentColor; border-image: none; width: 14px; height: 15px; background-color: rgb(255, 255, 204);"></button><button id="CCFFFF" style="margin: 2px; border: 0px currentColor; border-image: none; width: 14px; height: 15px; background-color: rgb(204, 255, 255);"></button><button id="660066" style="margin: 2px; border: 0px currentColor; border-image: none; width: 14px; height: 15px; background-color: rgb(102, 0, 102);"></button><button id="FF8080" style="margin: 2px; border: 0px currentColor; border-image: none; width: 14px; height: 15px; background-color: rgb(255, 128, 128);"></button><button id="0066CC" style="margin: 2px; border: 0px currentColor; border-image: none; width: 14px; height: 15px; background-color: rgb(0, 102, 204);"></button><button id="CCCCFF" style="margin: 2px; border: 0px currentColor; border-image: none; width: 14px; height: 15px; background-color: rgb(204, 204, 255);"></button><button id="000080" style="margin: 2px; border: 0px currentColor; border-image: none; width: 14px; height: 15px; background-color: rgb(0, 0, 128);"></button><button id="FF00FF" style="margin: 2px; border: 0px currentColor; border-image: none; width: 14px; height: 15px; background-color: rgb(255, 0, 255);"></button><button id="FFFF00" style="margin: 2px; border: 0px currentColor; border-image: none; width: 14px; height: 15px; background-color: rgb(255, 255, 0);"></button><button id="00FFFF" style="margin: 2px; border: 0px currentColor; border-image: none; width: 14px; height: 15px; background-color: rgb(0, 255, 255);"></button><button id="800080" style="margin: 2px; border: 0px currentColor; border-image: none; width: 14px; height: 15px; background-color: rgb(128, 0, 128);"></button><button id="800000" style="margin: 2px; border: 0px currentColor; border-image: none; width: 14px; height: 15px; background-color: rgb(128, 0, 0);"></button><button id="008080" style="margin: 2px; border: 0px currentColor; border-image: none; width: 14px; height: 15px; background-color: rgb(0, 128, 128);"></button><button id="0000FF" style="margin: 2px; border: 0px currentColor; border-image: none; width: 14px; height: 15px; background-color: rgb(0, 0, 255);"></button><button id="00CCFF" style="margin: 2px; border: 0px currentColor; border-image: none; width: 14px; height: 15px; background-color: rgb(0, 204, 255);"></button><button id="CCFFFF" style="margin: 2px; border: 0px currentColor; border-image: none; width: 14px; height: 15px; background-color: rgb(204, 255, 255);"></button><button id="CCFFCC" style="margin: 2px; border: 0px currentColor; border-image: none; width: 14px; height: 15px; background-color: rgb(204, 255, 204);"></button><button id="FFFF99" style="margin: 2px; border: 0px currentColor; border-image: none; width: 14px; height: 15px; background-color: rgb(255, 255, 153);"></button><button id="99CCFF" style="margin: 2px; border: 0px currentColor; border-image: none; width: 14px; height: 15px; background-color: rgb(153, 204, 255);"></button><button id="FF99CC" style="margin: 2px; border: 0px currentColor; border-image: none; width: 14px; height: 15px; background-color: rgb(255, 153, 204);"></button><button id="CC99FF" style="margin: 2px; border: 0px currentColor; border-image: none; width: 14px; height: 15px; background-color: rgb(204, 153, 255);"></button><button id="FFCC99" style="margin: 2px; border: 0px currentColor; border-image: none; width: 14px; height: 15px; background-color: rgb(255, 204, 153);"></button><button id="3366FF" style="margin: 2px; border: 0px currentColor; border-image: none; width: 14px; height: 15px; background-color: rgb(51, 102, 255);"></button><button id="33CCCC" style="margin: 2px; border: 0px currentColor; border-image: none; width: 14px; height: 15px; background-color: rgb(51, 204, 204);"></button><button id="99CC00" style="margin: 2px; border: 0px currentColor; border-image: none; width: 14px; height: 15px; background-color: rgb(153, 204, 0);"></button><button id="FFCC00" style="margin: 2px; border: 0px currentColor; border-image: none; width: 14px; height: 15px; background-color: rgb(255, 204, 0);"></button><button id="FF9900" style="margin: 2px; border: 0px currentColor; border-image: none; width: 14px; height: 15px; background-color: rgb(255, 153, 0);"></button><button id="FF6600" style="margin: 2px; border: 0px currentColor; border-image: none; width: 14px; height: 15px; background-color: rgb(255, 102, 0);"></button><button id="666699" style="margin: 2px; border: 0px currentColor; border-image: none; width: 14px; height: 15px; background-color: rgb(102, 102, 153);"></button><button id="969696" style="margin: 2px; border: 0px currentColor; border-image: none; width: 14px; height: 15px; background-color: rgb(150, 150, 150);"></button><button id="003366" style="margin: 2px; border: 0px currentColor; border-image: none; width: 14px; height: 15px; background-color: rgb(0, 51, 102);"></button><button id="339966" style="margin: 2px; border: 0px currentColor; border-image: none; width: 14px; height: 15px; background-color: rgb(51, 153, 102);"></button><button id="003300" style="margin: 2px; border: 0px currentColor; border-image: none; width: 14px; height: 15px; background-color: rgb(0, 51, 0);"></button><button id="333300" style="margin: 2px; border: 0px currentColor; border-image: none; width: 14px; height: 15px; background-color: rgb(51, 51, 0);"></button><button id="993300" style="margin: 2px; border: 0px currentColor; border-image: none; width: 14px; height: 15px; background-color: rgb(153, 51, 0);"></button><button id="993366" style="margin: 2px; border: 0px currentColor; border-image: none; width: 14px; height: 15px; background-color: rgb(153, 51, 102);"></button><button id="333399" style="margin: 2px; border: 0px currentColor; border-image: none; width: 14px; height: 15px; background-color: rgb(51, 51, 153);"></button><button id="333333" style="margin: 2px; border: 0px currentColor; border-image: none; width: 14px; height: 15px; background-color: rgb(51, 51, 51);"></button><button class="rad" style="width: 100%; height: 30px;">fermer la palette</button></div>
                </div>
                <div class="Frad" id="fradbackcolor"><img title="Mettre une couleur de fond sous le texte" class="rad" id="backcolor" src="C:/Users/polux/Desktop/BOUTON WIG/backcolor.gif"></div>
                <div class="Frad" id="fradshadowcolor"><img title="Ajouter une Ombre de couleur au texte" class="rad" id="shadowcolor" src="C:/Users/polux/Desktop/BOUTON WIG/textshadowcolor.gif"></div>
                <div class="Frad" id="fradRemoveFormat"><img title="effacer tout formatage du texte" class="rad" id="RemoveFormat" src="C:/Users/polux/Desktop/BOUTON WIG/RemoveFormat.gif"></div>
            </div>
            <div class="CMB" id="barre2" style="width: 90px;">
                <div class="Frad" id="fradinsertimg"><img title="Insérer une image dans le document" class="rad" id="insertimg" src="C:/Users/polux/Desktop/BOUTON WIG/insertimg.gif"></div>
                <div class="Frad" id="fradinsertemo"><img title="Insérer une émoticone dans le text" class="rad" id="insertemo" src="C:\Users\polux\Desktop\BOUTON WIG\emo1.gif"></div>
                <div class="Frad" id="fradajoudiv"><img title="Ajouter un div dans le document" class="rad" id="ajoutdivmenu" src="C:/Users/polux/Desktop/BOUTON WIG/ajoutdiv.gif">
                    <!----------------MENU DIV------------>
                    <div id="menudivmenu" class="menusup" style="width:570px;height:220px; visibility:hidden; ">
                        <button class="btclose">X</button>
                        <div class="selects2" id="menuaction" style="position:absolute; left:10px;top:10px;width:120px;height:185px;">
                            <button class="rad" id="ajoutdiv" style="height:30px;">Ajouter un div</button>
                            <button class="rad" id="coin" style="height:30px;">Arrondi des coins</button>
                            <button class="rad" id="borderwidth" style="height:30px;">BorderWidth</button>
                            <button class="rad" id="bordercolor" style="height:30px;">Bordercolor</button>
                            <button class="rad" id="backcouleurdiv" style="height:30px;">Background Color</button>
                            <button class="rad" title="METTRE UNE IMAGE EN BACKGROUND" id="backimage" style="height:30px;">Background image</button>
                        </div>
                        <!------------------------------------------->
                        <div class="selects2" id="menucoin" style="position:absolute; width:300px;height:150px;left: 160px;top:30px;margin-right:1px; visibility:hidden ; ">
                            <p class="slideImpRa" id=o ne>
                                <label class="labslide" for="slidebordhg">coin Haut Gauche :</label>
                                <input class="slide" type="range" min="0" max="100" id="slidebordhg">
                            </p>
                            <p class="slideImpRa">
                                <label for="slidebordhd">coin Haut droite :&nbsp; &nbsp;</label>
                                <input class="slide" type="range" min="0" max="100" id="slidebordhd">
                            </p>
                            <p class="slideImpRa">
                                <label for="slidebordbg">coin Bas  Gauche :&nbsp;&nbsp;</label>
                                <input class="slide" type="range" min="0" max="100" id="slidebordbg">
                            </p>
                            <p class="slideImpRa">
                                <label for="slidebordbd">coin Bas  Droite  :&nbsp;&nbsp; &nbsp;</label>
                                <input class="slide" type="range" min="0" max="100" id="slidebordbd">
                            </p>
                            <p class="slideImpRa">
                                <label for="slidebordfour">les quate angles :&nbsp;&nbsp; &nbsp;</label>
                                <input class="slide" type="range" min="0" max="50" id="slidebordfour">
                            </p>
                        </div>
                        <!------------------------------------------->
                        <div class="selects2" id="menupal" style="position:absolute; width:400px;height:150px;left: 135px;top:25px;margin-right:1px;visibility:hidden ; ">
                            <canvas class="nomov" id="palcouleur" style="margin-left:10px;width:180px;height:75px;border:1px solid red;"></canvas>
                            <canvas class="nomov" id="palcouleur2" style="margin-left:10px;width:180px;height:75px;border:1px solid red;"></canvas>
                            <input id="transp1" title="TRANSPARENCE COULEUR 1" type="range" style=" position:absolute;top:70px;left:10px;width:130px;">
                            <input id="transp2" title="TRANSPARENCE COULEUR 2" type="range" style=" position:absolute;top:70px;left:260px;width:130px;">
                            <input id="pourcent" title="POURCENTAGE DE LA COULEUR " type="range" style=" position:absolute;top:100px;left:60px;width:280px;">
                            <button class="rad" id="supback2" ) title "SUPPRIMER LA COULEUR 2" style="position:absolute;left:230px;top:80px;width:25px;height:25px;">X</button>
                        </div>
                        <!------------------------------------------->
                        <div class="selects2" id="menuborderwidth" style="position:absolute; width:300px;height:150px;left: 160px;top:30px;margin-right:1px;visibility:hidden ; ">
                            <p> Modifier l'épaisseur des bordures du div actif</p>
                            <p style="margin-top:10px;">
                                <input type="range" min="0" max="50" id="slidebordwidth">
                            </p>
                        </div>
                        <!------------------------------------------->
                    </div>
                    <!----------------fin de menu div--------------------------->
     
                    <!----------------------------------------------->
                </div>
                <div class="Frad" id="fradinsertable"><img title="Insérer un Tableau dans le document" class="rad" id="insertable" src="C:/Users/polux/Desktop/BOUTON WIG/inserttable.gif"></div>
                <div class="Frad" id="fradcreateLink"><img title="Transformer le texte en lien" class="rad" id="createLink" src="C:/Users/polux/Desktop/BOUTON WIG/linck.gif"></div>
                <div class="Frad" id="fradunlink"><img title="Enlever le lien du texte" class="rad" id="unlink" src="C:/Users/polux/Desktop/BOUTON WIG/unlinck.gif"></div>
            </div>
            <div class="CMB" id="barre3" style="width: 60px;">
                <div class="Frad" id="fradnew document"><img title="Nouveau document" class="rad" id="new document" src="C:/Users/polux/Desktop/BOUTON WIG/nouveaudoc.GIF"></div>
                <div class="Frad" id="fradimpression"><img title="Imprimer le Document" class="rad" id="impression" src="C:/Users/polux/Desktop/BOUTON WIG/imprimer.GIF"></div>
                <div class="Frad" id="fradchoisir le dossier"><img title="Menu fichier" class="rad" id="choisir le dossier" src="C:/Users/polux/Desktop/BOUTON WIG/dossier.GIF">
                    <div class="palettecouleur" id="menudossier" style="width: 400px; height: 250px; visibility: hidden;"><button class="btclose" id="ferme">X</button><button class="rad" id="enregistrer" style="left: 20px; top: 30px; width: 150px; height: 30px; position: absolute;">Enregistrer</button><button class="rad" id="ouvrir" style="left: 20px; top: 70px; width: 150px; height: 30px; position: absolute;">ouvrir un fichier</button></div>
                </div>
            </div>
        </div>
        <div id="editeur" contenteditable="true">
            <p>&nbsp;</p>
            <p align="center">
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <font style="text-shadow: 0px 0px 10px #00ff00;">
                    <font color="#800080" size="7">EXEMPLE DE TEXTE</font>
                </font>
            </p>
        </div>
        <input id="fichier" style="height:0.1pt;" type="file" />
        <script>
            initialisation();
        </script>
    </body>
    </html>

    capture du phénomène

    Nom : demo2.gif
Affichages : 303
Taille : 731,5 Ko
    mes fichiers dans les contributions:
    mail avec CDO en vba et mail avec CDO en vbs dans un HTA
    survol des bouton dans userform
    prendre un cliché d'un range

    si ton problème est résolu n'oublie pas de pointer : : ça peut servir aux autres
    et n'oublie pas de voter

  2. #2
    Inactif  

    Homme Profil pro
    cuisiniste
    Inscrit en
    Avril 2009
    Messages
    15 379
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Var (Provence Alpes Côte d'Azur)

    Informations professionnelles :
    Activité : cuisiniste
    Secteur : Bâtiment

    Informations forums :
    Inscription : Avril 2009
    Messages : 15 379
    Points : 12 075
    Points
    12 075
    Billets dans le blog
    8
    Par défaut re
    probleme résolu
    je les met tous a visibility="hidden" a la fermeture
    je pensais qu'il hériteraient de l'état du parent , c'est le cas si ils ne sont pas style pour la visibility dans le cas contraire il n'héritent pas du parent

    merci quand même d'avoir jeté un coup d'oeuil
    mes fichiers dans les contributions:
    mail avec CDO en vba et mail avec CDO en vbs dans un HTA
    survol des bouton dans userform
    prendre un cliché d'un range

    si ton problème est résolu n'oublie pas de pointer : : ça peut servir aux autres
    et n'oublie pas de voter

  3. #3
    Rédacteur/Modérateur

    Avatar de SpaceFrog
    Homme Profil pro
    Développeur Web Php Mysql Html Javascript CSS Apache - Intégrateur - Bidouilleur SharePoint
    Inscrit en
    Mars 2002
    Messages
    39 637
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 74
    Localisation : Royaume-Uni

    Informations professionnelles :
    Activité : Développeur Web Php Mysql Html Javascript CSS Apache - Intégrateur - Bidouilleur SharePoint
    Secteur : Industrie

    Informations forums :
    Inscription : Mars 2002
    Messages : 39 637
    Points : 66 656
    Points
    66 656
    Billets dans le blog
    1
    Par défaut
    A mon avis tu a un problème de balancement de balises car le contenu d'une balise hidden est forcément hidden

    https://jsfiddle.net/js5f3vx1/
    Ma page Developpez - Mon Blog Developpez
    Président du CCMPTP (Comité Contre le Mot "Problème" dans les Titres de Posts)
    Deux règles du succès: 1) Ne communiquez jamais à quelqu'un tout votre savoir...
    Votre post est résolu ? Alors n'oubliez pas le Tag

    Venez sur le Chat de Développez !

  4. #4
    Inactif  

    Homme Profil pro
    cuisiniste
    Inscrit en
    Avril 2009
    Messages
    15 379
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Var (Provence Alpes Côte d'Azur)

    Informations professionnelles :
    Activité : cuisiniste
    Secteur : Bâtiment

    Informations forums :
    Inscription : Avril 2009
    Messages : 15 379
    Points : 12 075
    Points
    12 075
    Billets dans le blog
    8
    Par défaut re
    Bonjour spacefrog
    balancement je ne sais pas mais

    jai
    exeemple

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    <div id =div1>
     
      <div id enfant1> blablabla</div>
    <div id=enfant2></div>
    <!---------------etc...----->
    </div>
    chaque div enfant sont hidden au depart

    avec des boutons je les rends visible ou pas
    et dans le div parent j'ai un bouton pour le rendre hidden lui meme (fermeture de menu principal

    a chaque fois que j'en rends un visible celui que j'avais fait apparaitre avant est de nouveau hidden
    mais a la fermeture du maitre il y en a toujours de ces enfants le dernier utilisé qui est resté visible
    et effectivement si je n'avais pas de style="visibility:"visible" dans son code inline il hériterait du maitre mais justement il ont tous la propriété inline
    et ca on y peut rien
    j'ai donc utiliser la variable utiliser a l'intérieur pour ger les enfants "oldmenu "
    oldmenu c'est une variable object élément qui change en fonction du menu choisi

    a la fermeture je fait un oldmenu hidden
    impossible autrement
    mes fichiers dans les contributions:
    mail avec CDO en vba et mail avec CDO en vbs dans un HTA
    survol des bouton dans userform
    prendre un cliché d'un range

    si ton problème est résolu n'oublie pas de pointer : : ça peut servir aux autres
    et n'oublie pas de voter

  5. #5
    Rédacteur/Modérateur

    Avatar de SpaceFrog
    Homme Profil pro
    Développeur Web Php Mysql Html Javascript CSS Apache - Intégrateur - Bidouilleur SharePoint
    Inscrit en
    Mars 2002
    Messages
    39 637
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 74
    Localisation : Royaume-Uni

    Informations professionnelles :
    Activité : Développeur Web Php Mysql Html Javascript CSS Apache - Intégrateur - Bidouilleur SharePoint
    Secteur : Industrie

    Informations forums :
    Inscription : Mars 2002
    Messages : 39 637
    Points : 66 656
    Points
    66 656
    Billets dans le blog
    1
    Par défaut
    Bine balancées veut dire que chaque balise ouvrante doit avoir sa balise de fermeture correspondante et qu'il n'y ait pas de chevauchement
    Ce qui au vu de ton bout de code ci dessus me parait compromis ... manque de >, id non entre quotes ...

    en reprenant et corrigeant ton code voici une démon fonctionnelle
    https://jsfiddle.net/js5f3vx1/1/

    les enfant disparaissent bien ...

    je pense donc qu'il doit bien s'agir d'un souci de syntaxe HTML avec des balises mal fermées ...
    Ma page Developpez - Mon Blog Developpez
    Président du CCMPTP (Comité Contre le Mot "Problème" dans les Titres de Posts)
    Deux règles du succès: 1) Ne communiquez jamais à quelqu'un tout votre savoir...
    Votre post est résolu ? Alors n'oubliez pas le Tag

    Venez sur le Chat de Développez !

  6. #6
    Inactif  

    Homme Profil pro
    cuisiniste
    Inscrit en
    Avril 2009
    Messages
    15 379
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Var (Provence Alpes Côte d'Azur)

    Informations professionnelles :
    Activité : cuisiniste
    Secteur : Bâtiment

    Informations forums :
    Inscription : Avril 2009
    Messages : 15 379
    Points : 12 075
    Points
    12 075
    Billets dans le blog
    8
    Par défaut re
    Bonjour Spacefrog

    oui je sais c'était juste pour montrer le shema de structure
    le vrai code du div maitre c'est cela
    tout les sous div sont a hidden au départ sauf le sous div menu action
    dans le quel les boutons affiche les autres sous div en changeant hidden pour visible
    dans le deboger de IE il n'y a pas d'erreur ????????

    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
    <!----------------MENU DIV------------>
    <div id="menudivmenu" class="menusup" style="width:570px;height:220px; visibility:hidden; ">
        <button class="btclose" id="ferm">X</button>
        <div class="selects2" id="menuaction" style="position:absolute; left:10px;top:10px;width:120px;height:185px;">
            <button class="rad" id="ajoutdiv" style="height:30px;">Ajouter un div</button>
            <button class="rad" id="coin" style="height:30px;">Arrondi des coins</button>
            <button class="rad" id="borderwidth" style="height:30px;">BorderWidth</button>
            <button class="rad" id="bordercolor" style="height:30px;">Bordercolor</button>
            <button class="rad" id="backcouleurdiv" style="height:30px;">Background Color</button>
            <button class="rad" title="METTRE UNE IMAGE EN BACKGROUND" id="backimage" style="height:30px;">Background image</button>
        </div>
        <!------------------------------------------->
        <div class="selects2" id="menucoin" style="position:absolute; width:300px;height:150px;left: 160px;top:30px;margin-right:1px; visibility:hidden ; ">
            <p class="slideImpRa" id=o ne>
                <label class="labslide" for="slidebordhg">coin Haut Gauche :</label>
                <input class="slide" type="range" min="0" max="100" id="slidebordhg">
            </p>
            <p class="slideImpRa">
                <label for="slidebordhd">coin Haut droite :&nbsp; &nbsp;</label>
                <input class="slide" type="range" min="0" max="100" id="slidebordhd">
            </p>
            <p class="slideImpRa">
                <label for="slidebordbg">coin Bas  Gauche :&nbsp;&nbsp;</label>
                <input class="slide" type="range" min="0" max="100" id="slidebordbg">
            </p>
            <p class="slideImpRa">
                <label for="slidebordbd">coin Bas  Droite  :&nbsp;&nbsp; &nbsp;</label>
                <input class="slide" type="range" min="0" max="100" id="slidebordbd">
            </p>
            <p class="slideImpRa">
                <label for="slidebordfour">les quatre angles :&nbsp;&nbsp; &nbsp;</label>
                <input class="slide" type="range" min="0" max="50" id="slidebordfour">
            </p>
        </div>
        <!------------------------------------------->
        <div class="selects2" id="menupal" style="position:absolute; width:400px;height:150px;left: 135px;top:25px;margin-right:1px;visibility:hidden ; ">
            <canvas class="nomov" id="palcouleur" style="margin-left:10px;width:180px;height:75px;border:1px solid red;"></canvas>
            <canvas class="nomov" id="palcouleur2" style="margin-left:10px;width:180px;height:75px;border:1px solid red;"></canvas>
            <input id="transp1" title="TRANSPARENCE COULEUR 1" type="range" style=" position:absolute;top:70px;left:10px;width:130px;">
            <input id="transp2" title="TRANSPARENCE COULEUR 2" type="range" style=" position:absolute;top:70px;left:260px;width:130px;">
            <input id="pourcent" title="POURCENTAGE DE LA COULEUR " type="range" style=" position:absolute;top:100px;left:60px;width:280px;">
            <button class="rad" id="supback2" title= "SUPPRIMER LA COULEUR 2" style="position:absolute;left:230px;top:80px;width:25px;height:25px;">X</button>
        </div>
        <!------------------------------------------->
        <div class="selects2" id="menuborderwidth" style="position:absolute; width:300px;height:150px;left: 160px;top:30px;margin-right:1px;visibility:hidden ; ">
            <p> Modifier l'épaisseur des bordures du div actif</p>
            <p style="margin-top:10px;">
                <input type="range" min="0" max="50" id="slidebordwidth">
            </p>
        </div>
        <!------------------------------------------->
    </div>
    <!----------------fin de menu div--------------------------->
    il y a a chaque fois dans les div menu comme celui la un bouton class btclose
    pour le fermer dans je JS
    le code c'est

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    var btclose=document.getElementsByClassName("btclose");
       for (var i=0;i<btclose.length;i++){
             btclose[i] .addEventListener("click", function() {   this.parentElement.style.visibility="hidden";
    //document.getElementById("menuborderwidth").style.visibility="hidden";
    //document.getElementById("menupal").style.visibility="hidden";
    //document.getElementById("menucoin").style.visibility="hidden";
     oldmenu.style.visibility ="hidden"//oldmenu et le dernier qui a été affiché
    });
    mes fichiers dans les contributions:
    mail avec CDO en vba et mail avec CDO en vbs dans un HTA
    survol des bouton dans userform
    prendre un cliché d'un range

    si ton problème est résolu n'oublie pas de pointer : : ça peut servir aux autres
    et n'oublie pas de voter

  7. #7
    Rédacteur/Modérateur

    Avatar de SpaceFrog
    Homme Profil pro
    Développeur Web Php Mysql Html Javascript CSS Apache - Intégrateur - Bidouilleur SharePoint
    Inscrit en
    Mars 2002
    Messages
    39 637
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 74
    Localisation : Royaume-Uni

    Informations professionnelles :
    Activité : Développeur Web Php Mysql Html Javascript CSS Apache - Intégrateur - Bidouilleur SharePoint
    Secteur : Industrie

    Informations forums :
    Inscription : Mars 2002
    Messages : 39 637
    Points : 66 656
    Points
    66 656
    Billets dans le blog
    1
    Par défaut
    https://jsfiddle.net/29yyz9a5/1/

    J'ai juste rajouté un z-index pour le bouton de fermeture afin qu'il se mette au dessus ...

    tout disparait bien ...
    Ma page Developpez - Mon Blog Developpez
    Président du CCMPTP (Comité Contre le Mot "Problème" dans les Titres de Posts)
    Deux règles du succès: 1) Ne communiquez jamais à quelqu'un tout votre savoir...
    Votre post est résolu ? Alors n'oubliez pas le Tag

    Venez sur le Chat de Développez !

  8. #8
    Inactif  

    Homme Profil pro
    cuisiniste
    Inscrit en
    Avril 2009
    Messages
    15 379
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Var (Provence Alpes Côte d'Azur)

    Informations professionnelles :
    Activité : cuisiniste
    Secteur : Bâtiment

    Informations forums :
    Inscription : Avril 2009
    Messages : 15 379
    Points : 12 075
    Points
    12 075
    Billets dans le blog
    8
    Par défaut re
    et oui c'est ca que tu n'a pas compris dans ma démarche
    quand j'ouvre ce menu ils sont tous hidden
    les bouton du menu action les rendent visible ou pas par js
    et des que j'ai terminé je ferme mais le dernier sous div que j'ai affiché sa propriété n'est plus hidden mais visible et la toc!!! il reste

    je viens de tester en mettant un des sous div a visible et re teste tu va voir pas le menu action choisi en un autre
    mes fichiers dans les contributions:
    mail avec CDO en vba et mail avec CDO en vbs dans un HTA
    survol des bouton dans userform
    prendre un cliché d'un range

    si ton problème est résolu n'oublie pas de pointer : : ça peut servir aux autres
    et n'oublie pas de voter

  9. #9
    Rédacteur/Modérateur

    Avatar de SpaceFrog
    Homme Profil pro
    Développeur Web Php Mysql Html Javascript CSS Apache - Intégrateur - Bidouilleur SharePoint
    Inscrit en
    Mars 2002
    Messages
    39 637
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 74
    Localisation : Royaume-Uni

    Informations professionnelles :
    Activité : Développeur Web Php Mysql Html Javascript CSS Apache - Intégrateur - Bidouilleur SharePoint
    Secteur : Industrie

    Informations forums :
    Inscription : Mars 2002
    Messages : 39 637
    Points : 66 656
    Points
    66 656
    Billets dans le blog
    1
    Par défaut
    https://jsfiddle.net/29yyz9a5/2/

    Utilise plutot le display none ...
    Ma page Developpez - Mon Blog Developpez
    Président du CCMPTP (Comité Contre le Mot "Problème" dans les Titres de Posts)
    Deux règles du succès: 1) Ne communiquez jamais à quelqu'un tout votre savoir...
    Votre post est résolu ? Alors n'oubliez pas le Tag

    Venez sur le Chat de Développez !

  10. #10
    Inactif  

    Homme Profil pro
    cuisiniste
    Inscrit en
    Avril 2009
    Messages
    15 379
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Var (Provence Alpes Côte d'Azur)

    Informations professionnelles :
    Activité : cuisiniste
    Secteur : Bâtiment

    Informations forums :
    Inscription : Avril 2009
    Messages : 15 379
    Points : 12 075
    Points
    12 075
    Billets dans le blog
    8
    Par défaut
    re
    a oui
    mais je suis quand même obligé de traiter oldmenu(dernier sous div affiché) on est bien d'accords????
    mes fichiers dans les contributions:
    mail avec CDO en vba et mail avec CDO en vbs dans un HTA
    survol des bouton dans userform
    prendre un cliché d'un range

    si ton problème est résolu n'oublie pas de pointer : : ça peut servir aux autres
    et n'oublie pas de voter

  11. #11
    Rédacteur/Modérateur

    Avatar de SpaceFrog
    Homme Profil pro
    Développeur Web Php Mysql Html Javascript CSS Apache - Intégrateur - Bidouilleur SharePoint
    Inscrit en
    Mars 2002
    Messages
    39 637
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 74
    Localisation : Royaume-Uni

    Informations professionnelles :
    Activité : Développeur Web Php Mysql Html Javascript CSS Apache - Intégrateur - Bidouilleur SharePoint
    Secteur : Industrie

    Informations forums :
    Inscription : Mars 2002
    Messages : 39 637
    Points : 66 656
    Points
    66 656
    Billets dans le blog
    1
    Par défaut
    Le traiter ? de Co**ard ??? il t'a rien fait ...

    Je ne vois pas trop ta problématique ... afficher masquer des blocks ça se gère assez facilement.

    Peux tu sur le fiddle reproduire ton souci ?
    Ma page Developpez - Mon Blog Developpez
    Président du CCMPTP (Comité Contre le Mot "Problème" dans les Titres de Posts)
    Deux règles du succès: 1) Ne communiquez jamais à quelqu'un tout votre savoir...
    Votre post est résolu ? Alors n'oubliez pas le Tag

    Venez sur le Chat de Développez !

  12. #12
    Inactif  

    Homme Profil pro
    cuisiniste
    Inscrit en
    Avril 2009
    Messages
    15 379
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Var (Provence Alpes Côte d'Azur)

    Informations professionnelles :
    Activité : cuisiniste
    Secteur : Bâtiment

    Informations forums :
    Inscription : Avril 2009
    Messages : 15 379
    Points : 12 075
    Points
    12 075
    Billets dans le blog
    8
    Par défaut re
    je vais essayer comme tout est dans le HTA ou HTML je vais séparer JS html style
    j'y vais a tout de suite
    reviens avec le lien si je trouve comment enregistrer
    mes fichiers dans les contributions:
    mail avec CDO en vba et mail avec CDO en vbs dans un HTA
    survol des bouton dans userform
    prendre un cliché d'un range

    si ton problème est résolu n'oublie pas de pointer : : ça peut servir aux autres
    et n'oublie pas de voter

  13. #13
    Modérateur

    Avatar de NoSmoking
    Homme Profil pro
    Inscrit en
    Janvier 2011
    Messages
    16 959
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Isère (Rhône Alpes)

    Informations forums :
    Inscription : Janvier 2011
    Messages : 16 959
    Points : 44 122
    Points
    44 122
    Par défaut
    Bonjour,
    (...)et effectivement si je n'avais pas de style="visibility:"visible" dans son code inline il hériterait du maitre ...
    dixit : 11.2 Visibility: the 'visibility' property
    hidden
    The generated box is invisible (fully transparent, nothing is drawn), but still affects layout. Furthermore, descendants of the element will be visible if they have 'visibility: visible'.

  14. #14
    Inactif  

    Homme Profil pro
    cuisiniste
    Inscrit en
    Avril 2009
    Messages
    15 379
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Var (Provence Alpes Côte d'Azur)

    Informations professionnelles :
    Activité : cuisiniste
    Secteur : Bâtiment

    Informations forums :
    Inscription : Avril 2009
    Messages : 15 379
    Points : 12 075
    Points
    12 075
    Billets dans le blog
    8
    Par défaut re
    bonjour noSmoking
    j'ai essayé de translaté ta citation bonjour la daube
    bref d’après ce que j'en ai compris c'est normal il faut donc traiter ce C...nrd!! de oldemenu
    c'est bien ce que je disais au départ
    cette conclusion je l'ai eu parce que il y a le menu "divaction" qui contient les boutons pour afficher les autres qui et n'a pas de style "visible ou pas": et lui s'en va bien avec le menu maître
    mes fichiers dans les contributions:
    mail avec CDO en vba et mail avec CDO en vbs dans un HTA
    survol des bouton dans userform
    prendre un cliché d'un range

    si ton problème est résolu n'oublie pas de pointer : : ça peut servir aux autres
    et n'oublie pas de voter

  15. #15
    Modérateur

    Avatar de NoSmoking
    Homme Profil pro
    Inscrit en
    Janvier 2011
    Messages
    16 959
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Isère (Rhône Alpes)

    Informations forums :
    Inscription : Janvier 2011
    Messages : 16 959
    Points : 44 122
    Points
    44 122
    Par défaut
    (...)bonjour la daube
    bref d’après ce que j'en ai compris c'est normal il faut donc traiter ce C...nrd!! de oldemenu ...
    il n'y a rien de plus clair et c'est du CSS2 tout à fait bien compris de TOUS les navigateurs même ceux considérés comme de la « daube » par ceux qui ne veulent pas connaître/apprendre/comprendre les bases
    De plus, les descendants de l'élément seront visibles s'ils ont une 'visibility: visible'.

  16. #16
    Inactif  

    Homme Profil pro
    cuisiniste
    Inscrit en
    Avril 2009
    Messages
    15 379
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Var (Provence Alpes Côte d'Azur)

    Informations professionnelles :
    Activité : cuisiniste
    Secteur : Bâtiment

    Informations forums :
    Inscription : Avril 2009
    Messages : 15 379
    Points : 12 075
    Points
    12 075
    Billets dans le blog
    8
    Par défaut re
    re
    c'est le translate anglais/francais qui est de la daube sur translate de google

    oui de toute façon c’était plus qu’évident vu le comportement de celui qui n'avait pas de style

    merci pour les retours
    mes fichiers dans les contributions:
    mail avec CDO en vba et mail avec CDO en vbs dans un HTA
    survol des bouton dans userform
    prendre un cliché d'un range

    si ton problème est résolu n'oublie pas de pointer : : ça peut servir aux autres
    et n'oublie pas de voter

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

Discussions similaires

  1. DIV parent transparent, mais pas l'enfant. c'est possible ?
    Par nightcyborg dans le forum Mise en page CSS
    Réponses: 2
    Dernier message: 16/03/2010, 17h14
  2. [AJAX] div qui ne disparaissent pas sous ie7
    Par starr dans le forum Général JavaScript
    Réponses: 1
    Dernier message: 17/07/2007, 17h16
  3. Problème avec un div qui n'est pas pris en compte
    Par boss_gama dans le forum Général JavaScript
    Réponses: 11
    Dernier message: 25/07/2006, 16h32
  4. Je n'arrive pas à diminuer la taille d'une div lorsque j'en insère une autre.
    Par psychoBob dans le forum Balisage (X)HTML et validation W3C
    Réponses: 1
    Dernier message: 27/05/2006, 21h04
  5. Div qui n'a pas une hauteur minimum
    Par Pumpkins dans le forum Balisage (X)HTML et validation W3C
    Réponses: 4
    Dernier message: 26/09/2005, 09h20

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