title: Adding Doctype Destroys Layout
body: <p>I have been working on a tab menu without adding the doctype statement. It works perfectly in my eyes but when I do place the <code>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"&gt;</code> or any other type of Doctype, my layout completely messes up. Below are three pictures which describe </p>
  
  <p><code>1.) Expanded Window (without doctype)</code></p>
  
  <p><code>2.) Contracted Window (without doctype)</code></p>
  
  <p><code>3.) Contracted Window (WITH doctype)</code></p>
  
  <p><img src="https://i.stack.imgur.com/t1oJF.png" alt="enter image description here"></p>
  
  <p>I'm using the <code>:after</code> pseudo to place the right side of the "sliding door" with the code snippet:</p>
  
  <pre><code>#nav li:after {
      width:10px;
      content:"";
      background: url('tabRight.png');
      position:absolute;
      height:100%;
      top:0;
      right:-10;
  }
  </code></pre>
  
  <p>I'm pretty new to web development so I have no idea what could be causing this. Any help at this point would be appreciated. Thanks!</p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;div id="nav"&gt;
  &lt;ul&gt;
      &lt;li id="dead"&gt;
          &lt;a href='javascript: toggle()'&gt;
              &lt;div script="padding-left:5px;"&gt;
                  &lt;img class="navImg" src="dead32.png" /&gt;
                  &lt;p class="navTxt"&gt;Deadlines&lt;/p&gt;
              &lt;/div&gt;
          &lt;/a&gt;
      &lt;/li&gt;
      &lt;li&gt;&amp;nbsp;&amp;nbsp;About&lt;/li&gt;
      &lt;li&gt;&amp;nbsp;&amp;nbsp;Address&lt;/li&gt;
  &lt;/ul&gt;
  &lt;/div&gt;
  </code></pre>
  
  <h2>EDIT:</h2>
  
  <p>The <code>right:-10;</code> is causing the problem. If I set <code>right:0;</code> The layout is restored, however then this makes the "sliding doors" not work for me. The transparent edge from the right sliding door shows the grey background when it overlaps the left sliding door, which is not what I want. </p>
  
  <p><img src="https://i.stack.imgur.com/BwdRv.png" alt="enter image description here"></p>