title: How to set right position to elements?
body: <p>I have a window that pops up after a button is clicked. In this window, in the modal's header, I want to realize switcher that has position between two words, &quot;оn&quot;, and ,&quot;&quot;off. But it looks like this now:</p>
  <p><a href="https://i.stack.imgur.com/NCbH2.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/NCbH2.png" alt="enter image description here" /></a></p>
  <p>There is a such sequence now: &quot;on&quot;-checkbox element-&quot;off&quot;-switcher, but I want &quot;on&quot;-switcher-&quot;off&quot;. How can I fix it?</p>
  <p>html:</p>
  <pre><code>&lt;button data-modal-target=&quot;#modal&quot; id=&quot;employee_tbl_btn&quot; data-table-url=&quot;{% url 'ajax_table_data' %}&quot;&gt;Open Window&lt;/button&gt;
      &lt;div class=&quot;modal&quot; id=&quot;modal&quot;&gt;
          &lt;div class=&quot;modal-header&quot;&gt;
              &lt;div class=&quot;item&quot;&gt;
                  &lt;label class=&quot;switch&quot;&gt;
                  &lt;label for=&quot;a&quot;&gt;on&lt;/label&gt;
                  &lt;input type=&quot;checkbox&quot; id=&quot;a&quot; class=&quot;switch&quot;&gt;
                  &lt;span class=&quot;slider round&quot;&gt;&lt;/span&gt;
                  &lt;label for=&quot;a&quot;&gt;off&lt;/label&gt;
                  &lt;/label&gt;
              &lt;/div&gt;
          &lt;/div&gt;
          &lt;div class=&quot;modal-body&quot;&gt;
              &lt;table id=&quot;employee_tbl&quot; class=&quot;styled-table&quot;&gt;&lt;/table&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  </code></pre>
  <p>css:</p>
  <pre><code>.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: 200ms ease-in-out;
    border: 1px solid black;
    border-radius: 10px;
    z-index: 10;
    background-color: white;
    height: 600px;
    width: 620px;
    max-width: 80%;
    overflow: auto;
  }
  
  .modal.active {
    transform: translate(-50%, -50%) scale(1);
  }
  
  .modal-body {
    padding: 1px 15px;
  }
  
  /* The switch - the box around the slider */
  .switch {
    position: fixed;
    display: inline-block;
    width: 60px;
    height: 34px;
  }
  
  /*!* Hide default HTML checkbox *!*/
  .switch input {
    opacity: 0;
    width: 0;
    height: 0;
  }
  
  /*!* The slider *!*/
  .slider {
    position: relative;
    cursor: pointer;
    top: 0;
    left: 0;
    right: -50%;
    bottom: 0;
    background-color: #2196F3;
    -webkit-transition: .4s;
    transition: .4s;
  }
  
  .slider:before {
    position: absolute;
    content: &quot;&quot;;
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: #2196F3;
    -webkit-transition: .4s;
    transition: .4s;
  }
  
  input:checked + .slider {
    background-color: #2196F3;
  }
  
  input:focus + .slider {
    box-shadow: 0 0 1px #2196F3;
  }
  
  input:checked + .slider:before {
    -webkit-transform: translateX(26px);
    -ms-transform: translateX(26px);
    transform: translateX(26px);
  }
  
  /* Rounded sliders */
  .slider.round {
    border-radius: 34px;
  }
  
  .slider.round:before {
    border-radius: 50%;
  }
  
  label {
      display: inline;
  }
  input[type=checkbox] {
      display: inline;
  
  </code></pre>