title: set attribute value in a dynamic stylesheet using jquery
body: <p>I want to create a dynamic stylesheet using jquery, css, php and html. 
  I'm doing an ajax request (with jquery) to give the php css file the width of my screen. 
  But my php css file doesn't include the value (window width) in the div (container) for the attribute width that was given by the ajax request.
  The Code should work for IE and FF.</p>
  
  <p><em>Code:</em></p>
  
  <p><strong>jQuery Ajax</strong></p>
  
  <pre><code>jQuery(document).ready(function($){
      $.ajax({
      type: "POST",
      cache: true,
      url: 'http://mywebpage/css/template.php',
      data: "bwidth=" + $(window).width(),
      async: false
      }); 
  });
  </code></pre>
  
  <p><strong>Including the php css file</strong></p>
  
  <pre><code>&lt;link rel='stylesheet' type='text/css' href='&lt;?php echo $this-&gt;baseurl; ?&gt;/templates/&lt;?php echo $this-&gt;template; ?&gt;/css/template.php' /&gt;
  </code></pre>
  
  <p><strong>in the php css file</strong></p>
  
  <pre><code>&lt;?php
  header("Content-type: text/css; charset: UTF-8");
  
  $bwidth = isset($_POST['bwidth']) ? (int) $_POST['bwidth'] : 800;
  ?&gt;
  
  #container
  {
  width: &lt;?php echo $bwidth . 'px'; ?&gt;; 
  }
  </code></pre>
  
  <p>What i'm doing wrong?</p>
  
  <p>Greets</p>