title: myDiv.style.display returns blank when set in master stylesheet
body: <p><b>Short Version:</b>  Is it standard behaviour that <code>myDiv.style.display</code> (Javascript) returns blank when I have set that <code>div</code> to <code>display:none</code> in a master stylesheet, yet returns "none" when it is set via an inline style?  </p>
  
  <p><b>Long Version:</b></p>
  
  <p>I have some <code>div</code>s that I hide and unhide via their <code>display</code> style, toggling it with Javascript between <code>block</code> and <code>none</code>.  They always start off hidden (<code>display:none</code>) which I have been setting with inline styles thusly:</p>
  
  <pre><code>&lt;div id="anID" class="aClass" style="display:none"&gt;
     stuff
  &lt;/div&gt;
  </code></pre>
  
  <p>Here is the Javascript to toggle between <code>none</code> and <code>block</code>.  The two chOpsXXX() functions just set the <code>divSection.style.display</code> to the opposite value (along with other housekeeping):</p>
  
  <pre><code>var divSection = document.getElementById("chOpsSection" + strSectionID);
  var strDisplay = divSection.style.display;
  if (strDisplay == "none") {
      chOpsDisplaySection(strSectionID);
  } else {
      chOpsHideSection(strSectionID);
  }
  </code></pre>
  
  <p>This all works fine when I use an inline style attribute to set the initial <code>display:none</code> style.</p>
  
  <p>I am also setting other styles for these divs in master stylesheet.  So I decided it might make sense to move the initial state of <code>display:none</code> to said stylesheet.  I did so.  I won't post it, I think you can picture it.</p>
  
  <p>But when I did so, the <code>div</code> is initially hidden (<code>display:none</code>), but the first call to <code>divSection.style.display</code> returns an empty string (<code>alert(strDisplay);</code> returns a blank string, not null).   </p>
  
  <p>My Javascript shown above then hides it (becaues it doesn't equal "none") and then the <i>next</i> call to <code>divSection.style.display</code> returns "none" and everything works fine from there.  (Same behaviour if I set it to <code>inline</code> in the master stylesheet: the <code>div</code> is initialy visible, and the first call to <code>divSection.style.display</code> returns a blank string).</p>
  
  <p>This is easy enough to fix by checking for both "none" and "" in my Javascript above.  But I would like to know if this returning of a blank string from <code>divSection.style.display</code> is standard behaviour.</p>
  
  <p>All replies are welcome.</p>