title: CSS not working in ASP.NET
body: <p>I have created a simple page in HTML which works fine. But when I import that to ASP.NET, the page design clutters up.</p>
  
  <p>Here is my <strong>Site.Master</strong></p>
  
  <pre><code>&lt;%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Site.master.cs" Inherits="Elite.WUI.Site" %&gt;
  
  &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  
  &lt;html xmlns="http://www.w3.org/1999/xhtml" &gt;
  &lt;head runat="server"&gt;
      &lt;title&gt;&lt;/title&gt;
      &lt;link rel="stylesheet" type="text/css" href="styles.css" /&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;form id="form1" runat="server"&gt;
      &lt;asp:ContentPlaceHolder ID="headerCPH" runat="server"&gt;
          &lt;div id="header"&gt;
              &lt;h1&gt;WUI&lt;/h1&gt;
          &lt;/div&gt;
          &lt;hr /&gt;
      &lt;/asp:ContentPlaceHolder&gt;
      &lt;asp:ContentPlaceHolder ID="navigationCPH" runat="server"&gt;
          &lt;div id="navigation"&gt;
              &lt;ul&gt;
                  &lt;li&gt;Home&lt;/li&gt;
                  &lt;li&gt;Users&lt;/li&gt;
                  &lt;li&gt;Campaigns&lt;/li&gt;
                  &lt;li&gt;Settings&lt;/li&gt;
              &lt;/ul&gt;
          &lt;/div&gt;
      &lt;/asp:ContentPlaceHolder&gt;
      &lt;asp:ContentPlaceHolder ID="contentCPH" runat="server"&gt;
      &lt;/asp:ContentPlaceHolder&gt;
      &lt;/form&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>my stylesheet <strong>styles.css</strong></p>
  
  <pre><code>#navigation
  {
      float: left;
      border: 1pt solid;
  }
  
  #navigation ul
  {
      list-style-type: none;
      padding: 5 5 5 5;
      margin: 0;
  }
  
  #content
  {
      margin-left: 9%;
      border: 1pt solid;
      padding-left: 5;
  }
  </code></pre>
  
  <p>and the actual page derived from master page</p>
  
  <pre><code>&lt;%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="ABC.aspx.cs" Inherits="Elite.WUI.ABC" %&gt;
  &lt;asp:Content ID="Content3" ContentPlaceHolderID="contentCPH" runat="server"&gt;
      &lt;div id="content"&gt;
          &lt;p&gt;Test content&lt;/p&gt;
      &lt;/div&gt;
  &lt;/asp:Content&gt;
  </code></pre>
  
  <p>Here is how it is displayed in Firefox (ver 3.6)</p>
  
  <p><img src="https://i.stack.imgur.com/hZPTp.jpg" alt="The margin property isn&#39;t working"></p>
  
  <p>As you can see that the border, list-style-type properties are working but margin isn't working. Can anyone tell me what am I doing wrong? I have tested it in Google Chrome but same issue. While the HTML and CSS works fine when there is no ASP.NET i.e. simple .html file.</p>