“Disable” a using the disable statement









up vote
1
down vote

favorite












i have this div



<div class="col-md-4 col-sm-6">
<div class="box17">
<img src="images/dash/rh.jpg" alt="">
<ul class="icon">
<li><a href="#"><i class="fa fa-users"></i></a></li>
</ul>
<div class="box-content">
<h3 class="title">Recursos Humanos</h3>
</div>
</div>
</div>


What i was tinking was add the disabled sentence in the div on the class "box17" like this



<div class="box17" disabled>


And change the backgroud in css with something like this



.box17:disabledpointer-events:none;background:#e4e4e4


But it does nothing, there is another way to "disable" the div?










share|improve this question





















  • What do you want to achieve with the disabled tag? What exactly is on your mind?
    – Sinan Samet
    Nov 9 at 19:16















up vote
1
down vote

favorite












i have this div



<div class="col-md-4 col-sm-6">
<div class="box17">
<img src="images/dash/rh.jpg" alt="">
<ul class="icon">
<li><a href="#"><i class="fa fa-users"></i></a></li>
</ul>
<div class="box-content">
<h3 class="title">Recursos Humanos</h3>
</div>
</div>
</div>


What i was tinking was add the disabled sentence in the div on the class "box17" like this



<div class="box17" disabled>


And change the backgroud in css with something like this



.box17:disabledpointer-events:none;background:#e4e4e4


But it does nothing, there is another way to "disable" the div?










share|improve this question





















  • What do you want to achieve with the disabled tag? What exactly is on your mind?
    – Sinan Samet
    Nov 9 at 19:16













up vote
1
down vote

favorite









up vote
1
down vote

favorite











i have this div



<div class="col-md-4 col-sm-6">
<div class="box17">
<img src="images/dash/rh.jpg" alt="">
<ul class="icon">
<li><a href="#"><i class="fa fa-users"></i></a></li>
</ul>
<div class="box-content">
<h3 class="title">Recursos Humanos</h3>
</div>
</div>
</div>


What i was tinking was add the disabled sentence in the div on the class "box17" like this



<div class="box17" disabled>


And change the backgroud in css with something like this



.box17:disabledpointer-events:none;background:#e4e4e4


But it does nothing, there is another way to "disable" the div?










share|improve this question













i have this div



<div class="col-md-4 col-sm-6">
<div class="box17">
<img src="images/dash/rh.jpg" alt="">
<ul class="icon">
<li><a href="#"><i class="fa fa-users"></i></a></li>
</ul>
<div class="box-content">
<h3 class="title">Recursos Humanos</h3>
</div>
</div>
</div>


What i was tinking was add the disabled sentence in the div on the class "box17" like this



<div class="box17" disabled>


And change the backgroud in css with something like this



.box17:disabledpointer-events:none;background:#e4e4e4


But it does nothing, there is another way to "disable" the div?







html css






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 9 at 19:08









Splorki

82




82











  • What do you want to achieve with the disabled tag? What exactly is on your mind?
    – Sinan Samet
    Nov 9 at 19:16

















  • What do you want to achieve with the disabled tag? What exactly is on your mind?
    – Sinan Samet
    Nov 9 at 19:16
















What do you want to achieve with the disabled tag? What exactly is on your mind?
– Sinan Samet
Nov 9 at 19:16





What do you want to achieve with the disabled tag? What exactly is on your mind?
– Sinan Samet
Nov 9 at 19:16













4 Answers
4






active

oldest

votes

















up vote
1
down vote



accepted










The div element supports global attributes which does not include disabled. Use a class instead.



<div class="box17 disabled">

.box17.disabledpointer-events:none;background:#e4e4e4





share|improve this answer





























    up vote
    1
    down vote













    Just add a class to that box div!






    div.box.disabled
    backgorund: #e4e4e4;
    pointer-events: none;

    <div class="col-md-4 col-sm-6">
    <div class="box box17 disabled">
    <img src="images/dash/rh.jpg" alt="">
    <ul class="icon">
    <li><a href="#"><i class="fa fa-users"></i></a></li>
    </ul>
    <div class="box-content">
    <h3 class="title">Recursos Humanos</h3>
    </div>
    </div>
    </div>








    share|improve this answer



























      up vote
      0
      down vote













      :disabled pseudo class cannot be used on a class name. It is only applicable to button, input, textarea, optgroup, option and fieldset.



      Use another class instead :



      <div class="box17 disabled">


      Then :



      .box17.disabled 
      pointer-events:none;
      background:#e4e4e4






      share|improve this answer



























        up vote
        0
        down vote













        You can't use disabled in divs. The only way to disable a div is to use pointer-events none



        .disabled-content 
        pointer-events: none;
        opacity: 0.75;



        Then your disabled div should be



        <div class="disabled-content">Disabled div</div>





        share|improve this answer




















          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53231912%2fdisable-a-div-using-the-disable-statement%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          4 Answers
          4






          active

          oldest

          votes








          4 Answers
          4






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          1
          down vote



          accepted










          The div element supports global attributes which does not include disabled. Use a class instead.



          <div class="box17 disabled">

          .box17.disabledpointer-events:none;background:#e4e4e4





          share|improve this answer


























            up vote
            1
            down vote



            accepted










            The div element supports global attributes which does not include disabled. Use a class instead.



            <div class="box17 disabled">

            .box17.disabledpointer-events:none;background:#e4e4e4





            share|improve this answer
























              up vote
              1
              down vote



              accepted







              up vote
              1
              down vote



              accepted






              The div element supports global attributes which does not include disabled. Use a class instead.



              <div class="box17 disabled">

              .box17.disabledpointer-events:none;background:#e4e4e4





              share|improve this answer














              The div element supports global attributes which does not include disabled. Use a class instead.



              <div class="box17 disabled">

              .box17.disabledpointer-events:none;background:#e4e4e4






              share|improve this answer














              share|improve this answer



              share|improve this answer








              edited Nov 9 at 19:16

























              answered Nov 9 at 19:10









              stealththeninja

              1,69211324




              1,69211324






















                  up vote
                  1
                  down vote













                  Just add a class to that box div!






                  div.box.disabled
                  backgorund: #e4e4e4;
                  pointer-events: none;

                  <div class="col-md-4 col-sm-6">
                  <div class="box box17 disabled">
                  <img src="images/dash/rh.jpg" alt="">
                  <ul class="icon">
                  <li><a href="#"><i class="fa fa-users"></i></a></li>
                  </ul>
                  <div class="box-content">
                  <h3 class="title">Recursos Humanos</h3>
                  </div>
                  </div>
                  </div>








                  share|improve this answer
























                    up vote
                    1
                    down vote













                    Just add a class to that box div!






                    div.box.disabled
                    backgorund: #e4e4e4;
                    pointer-events: none;

                    <div class="col-md-4 col-sm-6">
                    <div class="box box17 disabled">
                    <img src="images/dash/rh.jpg" alt="">
                    <ul class="icon">
                    <li><a href="#"><i class="fa fa-users"></i></a></li>
                    </ul>
                    <div class="box-content">
                    <h3 class="title">Recursos Humanos</h3>
                    </div>
                    </div>
                    </div>








                    share|improve this answer






















                      up vote
                      1
                      down vote










                      up vote
                      1
                      down vote









                      Just add a class to that box div!






                      div.box.disabled
                      backgorund: #e4e4e4;
                      pointer-events: none;

                      <div class="col-md-4 col-sm-6">
                      <div class="box box17 disabled">
                      <img src="images/dash/rh.jpg" alt="">
                      <ul class="icon">
                      <li><a href="#"><i class="fa fa-users"></i></a></li>
                      </ul>
                      <div class="box-content">
                      <h3 class="title">Recursos Humanos</h3>
                      </div>
                      </div>
                      </div>








                      share|improve this answer












                      Just add a class to that box div!






                      div.box.disabled
                      backgorund: #e4e4e4;
                      pointer-events: none;

                      <div class="col-md-4 col-sm-6">
                      <div class="box box17 disabled">
                      <img src="images/dash/rh.jpg" alt="">
                      <ul class="icon">
                      <li><a href="#"><i class="fa fa-users"></i></a></li>
                      </ul>
                      <div class="box-content">
                      <h3 class="title">Recursos Humanos</h3>
                      </div>
                      </div>
                      </div>








                      div.box.disabled
                      backgorund: #e4e4e4;
                      pointer-events: none;

                      <div class="col-md-4 col-sm-6">
                      <div class="box box17 disabled">
                      <img src="images/dash/rh.jpg" alt="">
                      <ul class="icon">
                      <li><a href="#"><i class="fa fa-users"></i></a></li>
                      </ul>
                      <div class="box-content">
                      <h3 class="title">Recursos Humanos</h3>
                      </div>
                      </div>
                      </div>





                      div.box.disabled
                      backgorund: #e4e4e4;
                      pointer-events: none;

                      <div class="col-md-4 col-sm-6">
                      <div class="box box17 disabled">
                      <img src="images/dash/rh.jpg" alt="">
                      <ul class="icon">
                      <li><a href="#"><i class="fa fa-users"></i></a></li>
                      </ul>
                      <div class="box-content">
                      <h3 class="title">Recursos Humanos</h3>
                      </div>
                      </div>
                      </div>






                      share|improve this answer












                      share|improve this answer



                      share|improve this answer










                      answered Nov 9 at 19:12









                      Kristers Dzintars

                      508




                      508




















                          up vote
                          0
                          down vote













                          :disabled pseudo class cannot be used on a class name. It is only applicable to button, input, textarea, optgroup, option and fieldset.



                          Use another class instead :



                          <div class="box17 disabled">


                          Then :



                          .box17.disabled 
                          pointer-events:none;
                          background:#e4e4e4






                          share|improve this answer
























                            up vote
                            0
                            down vote













                            :disabled pseudo class cannot be used on a class name. It is only applicable to button, input, textarea, optgroup, option and fieldset.



                            Use another class instead :



                            <div class="box17 disabled">


                            Then :



                            .box17.disabled 
                            pointer-events:none;
                            background:#e4e4e4






                            share|improve this answer






















                              up vote
                              0
                              down vote










                              up vote
                              0
                              down vote









                              :disabled pseudo class cannot be used on a class name. It is only applicable to button, input, textarea, optgroup, option and fieldset.



                              Use another class instead :



                              <div class="box17 disabled">


                              Then :



                              .box17.disabled 
                              pointer-events:none;
                              background:#e4e4e4






                              share|improve this answer












                              :disabled pseudo class cannot be used on a class name. It is only applicable to button, input, textarea, optgroup, option and fieldset.



                              Use another class instead :



                              <div class="box17 disabled">


                              Then :



                              .box17.disabled 
                              pointer-events:none;
                              background:#e4e4e4







                              share|improve this answer












                              share|improve this answer



                              share|improve this answer










                              answered Nov 9 at 19:10









                              Yann39

                              1,94332232




                              1,94332232




















                                  up vote
                                  0
                                  down vote













                                  You can't use disabled in divs. The only way to disable a div is to use pointer-events none



                                  .disabled-content 
                                  pointer-events: none;
                                  opacity: 0.75;



                                  Then your disabled div should be



                                  <div class="disabled-content">Disabled div</div>





                                  share|improve this answer
























                                    up vote
                                    0
                                    down vote













                                    You can't use disabled in divs. The only way to disable a div is to use pointer-events none



                                    .disabled-content 
                                    pointer-events: none;
                                    opacity: 0.75;



                                    Then your disabled div should be



                                    <div class="disabled-content">Disabled div</div>





                                    share|improve this answer






















                                      up vote
                                      0
                                      down vote










                                      up vote
                                      0
                                      down vote









                                      You can't use disabled in divs. The only way to disable a div is to use pointer-events none



                                      .disabled-content 
                                      pointer-events: none;
                                      opacity: 0.75;



                                      Then your disabled div should be



                                      <div class="disabled-content">Disabled div</div>





                                      share|improve this answer












                                      You can't use disabled in divs. The only way to disable a div is to use pointer-events none



                                      .disabled-content 
                                      pointer-events: none;
                                      opacity: 0.75;



                                      Then your disabled div should be



                                      <div class="disabled-content">Disabled div</div>






                                      share|improve this answer












                                      share|improve this answer



                                      share|improve this answer










                                      answered Nov 9 at 19:14









                                      Paul Mikki

                                      583




                                      583



























                                           

                                          draft saved


                                          draft discarded















































                                           


                                          draft saved


                                          draft discarded














                                          StackExchange.ready(
                                          function ()
                                          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53231912%2fdisable-a-div-using-the-disable-statement%23new-answer', 'question_page');

                                          );

                                          Post as a guest















                                          Required, but never shown





















































                                          Required, but never shown














                                          Required, but never shown












                                          Required, but never shown







                                          Required, but never shown

































                                          Required, but never shown














                                          Required, but never shown












                                          Required, but never shown







                                          Required, but never shown







                                          Popular posts from this blog

                                          Use pre created SQLite database for Android project in kotlin

                                          Darth Vader #20

                                          Ondo