title: Dynamic CSS with a variable parameter? (is it possible?)
body: <p>I'm trying to create a menu system, which is dynamically resizes itself horizontally to fill out depending on how many "li" entries there are, I'm dynamically creating the webpages with XSLT.  My thoughts are whether this is possible todo within CSS?</p>
  
  <p>Here's my CSS specifically for the HTML page</p>
  
  <pre><code>nav[role="navigation"] li {
      float: left;
      width: 10.00%;  /* I want to dynamically set this width */
  }
  </code></pre>
  
  <p>Snippet of HTML in question</p>
  
  <pre><code>&lt;nav role="navigation" count="2"&gt;&lt;?xml version="1.0" encoding="utf-8"?&gt;
    &lt;ul&gt;
      &lt;li&gt;
        &lt;a href="movies.html"&gt;Movies&lt;/a&gt;
      &lt;/li&gt;
      &lt;li&gt;
        &lt;a href="news.html"&gt;News&lt;/a&gt;
      &lt;/li&gt;
    &lt;ul&gt;
  &lt;/nav&gt;
  </code></pre>
  
  <p>My thoughts are of whether something like this would be possible to call the CSS with a parameter, or am I going against it's declarative ways?;</p>
  
  <pre><code>nav[role="navigation"] li param {
      float: left;
              switch(param)
              {
                 case : 5
                 {
            width: 20.00%;
                 }
                 case : 3
                 {
            width: 33.33333%;
                 }
              }
  }
  </code></pre>