title: How to target elements of a SimpleModal popup post
body: <p>I'm using the <a href="http://www.ericmmartin.com/projects/simplemodal/" rel="nofollow">simplemodal plugin</a> along with this <a href="http://wordpressthemescollection.com/ajax-wordpress-post-popup-with-simplemodal-and-jquery-488.html" rel="nofollow">tutorial</a> to popup posts on my wordpress site from thumbs on the homepage. I've read through the tutorials over and over and can't figure out how to target the overlay to style it. I also need to target the simplemodal-container aswell to style that. The tutorial gives this function to call a popup post.</p>
  
  <pre><code>jQuery(document).ready(function() {
      jQuery('a.postpopup').click(function(){
          id = jQuery(this).attr('rel');
          jQuery('&lt;div id="ajax-popup"&gt;&lt;/div&gt;').hide().appendTo('body').load('http://urlofyoursite.com/ajax-handler/?id='+id).modal();
          return false;
      });
  });
  </code></pre>
  
  <p>The simplemodal plugin says you can change the style of the overlay by using <code>overlayCss [Object:{}]</code> and change the style of the simplemodal-container using <code>containerCss [Object:{}]</code>. However, anywhere I try to place that in this function causes issues. I tried adding this under the function above, but it doesn't do anything.</p>
  
  <pre><code>jQuery("#ajax-popup").modal({
      opacity:80,
      overlayCss: {backgroundColor:"#000"},
      containerCss: {margin: "0 auto",top:0}
  });
  </code></pre>
  
  <p>What am I doing wrong and where I do I need to add this?</p>
  
  <p>Update: Ok Im getting somewhere but the container css won't override the default setting for some reason.</p>
  
  <pre><code>jQuery(document).ready(function() {
      jQuery('a.postpopup').live('click', function(){
          var id = jQuery(this).attr('rel');
          jQuery('&lt;div id="ajax-popup"&gt;&lt;/div&gt;').hide().appendTo('body').load('http://fameordie.com/ajax-handler/?id='+id).modal({
             opacity:90,
             containerCss:{
                 top:0
             },
             overlayClose:true
          });
          return false;
      }); 
  });
  </code></pre>