title: How to align two <div> tags horizontally in the same line inside a main <div> tag?
body: <p>I am trying to use two <code>&lt;div&gt;</code> elements inside a main <code>&lt;div&gt;</code>. But the problem is, in the first <code>&lt;div&gt;</code> I am using an <code>&lt;image&gt;</code> control and along with it I am fetching some text data from the database. And in second <code>&lt;div&gt;</code> I am using a <code>&lt;gridview&gt;</code>. But I am unable to show these two <code>&lt;div&gt;</code> elements in same line horizontally.</p>
  
  <p>I have tried doing this:</p>
  
  <pre><code>&lt;div style="width:1000px;overflow:hidden; height:auto; float:left; text-align:justify; margin-bottom:15px;"&gt;
      &lt;div id="right part" runat="server" style="width:auto; float:left; margin:0 12px 12px 0;"&gt;
          &lt;asp:Image ID="Image1" runat="server" Height="122px" Width="148px" /&gt;&lt;% =details %&gt;&lt;/div&gt;
      &lt;div id="left part" runat="server" style="float:left;width:auto;display:inline-block;"&gt;
          &lt;asp:GridView ID="GridView1" runat="server" ShowHeader="False" 
                        ForeColor="Black" GridLines="None" EnableModelValidation="True" 
                        onpageindexchanging="GridView1_PageIndexChanging" onrowcreated="GridView1_RowCreated"&gt;
          &lt;/asp:GridView&gt;    
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Please suggest me if I am doing something wrong?</p>