CSS fix for stacked gear icons in Drupal Panels? When using the Panels module within Drupal, I often end up with multiple gear icons stacked on top of each other, inaccessible to the Drupal admin.

For example, take a Panels page with this structure:


MyCustomContentPaneTop
A Drupal View
MyCustomContentPaneBottom


When logged in as a Drupal admin, I can access the gear icon for MyCustomContentPaneBottom easily.

However, when I try to edit MyCustomContentPaneTop, I can only see an "Edit Panel" gear icon. I can see that this originates with this code, toward the bottom of the page.

&lt;div class="contextual-links-wrapper contextual-links-processed"&gt;
  &lt;a class="contextual-links-trigger" href="#"&gt;Configure&lt;/a&gt;
  &lt;ul class="contextual-links" style="display: none;"&gt;
    &lt;li class="0 first last"&gt;
      &lt;a class="colorboxNodeContextual-processed" href="/admin/structure/pages/nojs/operation/page-MyPanelPageName/handlers/page_MyPanelPageName_panel_context_2/content"&gt;Edit Panel&lt;/a&gt;
    &lt;/li&gt;
  &lt;/ul&gt;
&lt;/div&gt;


I can see in the HTML source that the gear icon does exist for MyCustomContentPaneTop, but it must be sitting in a z-index below the Panels gear icon.

&lt;div class="pane-content"&gt;
  &lt;div class="contextual-links-region"&gt;&lt;div class="panel-display panel-1col clearfix" &gt;
  &lt;div class="panel-panel panel-col"&gt;
  &lt;div&gt;&lt;div class="contextual-links-region panel-pane pane-custom pane-1" &gt;
  &lt;div class="contextual-links-wrapper"&gt;&lt;ul class="contextual-links"&gt;&lt;li class="0 first last"&gt;&lt;a href="/admin/structure/ctools-content/list/MyCustomContentPaneTop/edit"&gt;Configure content pane&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;
  ...
&lt;/div&gt; 


I know I can hack around with very specific CSS rules that apply only to pages where I discover this issue. However, is there an easy Drupal (or CSS) method to say, "If two gear icons are stacked on top of one another, stagger them by 5 pixels?"
Here's the minified version of that same Javascript, from said coworker. :)

jQuery(function($){l=[];t=[];$('.contextual-links-wrapper').each(function(){h=$(this);o=h.offset();k=o.left;v=o.top;if($.inArray(k,l)&gt;-1&amp;&amp;$.inArray(v,t)&gt;-1){h.offset({top:v+=50})}l.push(k);t.push(v)})});