title: How to set the alignment of the web page on different screen resolution automatically?
body: <p>I'm making a project on ASP.NET and I've the resolution <code>1280x800</code>. I'm using the width of the web page <code>1245px</code> which is running very fine on my system but when I'm using the site on the resolution <code>1024x768</code> then the alignment goes out of the browser.  I'm using <code>&lt;div&gt;</code> width <code>1245px</code> which is looking nice on the resolution of the <code>1280x800</code>.<br>
  I tried this code but it is giving me error.    </p>
  
  <pre><code>protected void Page_Load(object sender, EventArgs e)
      {
          div1.Style.Add(HtmlTextWriterStyle.Width, System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width.ToString());
      }
  </code></pre>
  
  <p>It is giving error that     </p>
  
  <blockquote>
    <p>The type or namespace name 'Windows' does not exist in the namespace
    'System' (are you missing an assembly reference?)`</p>
  </blockquote>
  
  <p>So is there any simple way to fix it. </p>