title: How to center a div wrapped with panel in asp.net?
body: <p>I created a div(search result term bar) which should display only when user enters a search term and it should appears in center of the layout. </p>
  
  <p>I used the css style like below</p>
  
  <pre><code>search_list{ margin:0 auto; width:1000px; }
  </code></pre>
  
  <p>So that i appears center in all resolutions.</p>
  
  <p>Now i implemented an asp.net panel ajax control to show the div only when user enters the search term.</p>
  
  <p>Here below is my code:</p>
  
  <pre><code>&lt;asp:Panel runat="server" ID="pnlsearchinfo"&gt;
                              &lt;div class="search_list" id="SearchText" visible="false" runat="server"&gt;
      &lt;%--&lt;div class="search_text"&gt;Search Result for &lt;/div&gt;--%&gt;
  
      &lt;div class="search_term"&gt;
          &lt;asp:Label ID="lblsearchtxt" runat="server" Text=""&gt;&lt;/asp:Label&gt;&lt;/div&gt;
      &lt;div class="search_return"&gt;
          &lt;asp:ImageButton ID="IbtnSearchClose" ImageUrl="images/blu-close.jpg" runat="server"  align="absmiddle" OnClick="IbtnSearchClose_Click"  /&gt;&lt;asp:LinkButton
              ID="lnkSearchClose" runat="server" OnClick="lnkSearchClose_Click" &gt;Return to Full List&lt;/asp:LinkButton&gt;&lt;/div&gt;                
      &lt;br class="clr_flt" /&gt;
     &lt;/div&gt;&lt;!-- end search_list --&gt;&lt;/asp:Panel&gt;
     &lt;cc1:AlwaysVisibleControlExtender TargetControlID="pnlsearchinfo" ScrollEffectDuration="1"
                      ID="AlwaysVisibleControlExtender1" VerticalOffset="225"  runat="server" Enabled="true"&gt;
                  &lt;/cc1:AlwaysVisibleControlExtender&gt;  
  </code></pre>
  
  <p>But the problem is the margin:0 auto; is working fine in IE(search result term bar is centered). But in firefox its throwing issue(aligned to left)</p>
  
  <p>When i use Horizonaloffset its working in firefox. But it's not resolution friendly.
  Can i center the search result term bar with some other controls?</p>