Note that there are some explanatory texts on larger screens.

plurals
  1. POfloating a div with texts inside a parent div
    text
    copied!<p>I have a <code>&lt;div&gt;</code> that I want to float inside a parent <code>&lt;div&gt;</code>. The parent div contains some HTML entries like <code>texts, images, tables</code></p> <p>If I make the <code>HTML</code> like this then it gives the result I want</p> <pre><code>&lt;div class="parent-div"&gt; &lt;div class="child-div"&gt; Child div content &lt;/div&gt; Parent div HTML content &lt;/div&gt; </code></pre> <p>Result</p> <pre><code>+---------- parent div --------------+ |Parent HTML content... +-----------+| |...................... | child div || |...................... | child div || |...................... +-----------+| |....................................| |....................................| +------------------------------------+ </code></pre> <p>My problem is I don't want to put the second (child) div content before the parent content.</p> <p>I want to make the HTML like this</p> <pre><code>&lt;div class="parent-div"&gt; Parent div HTML content &lt;div class="child-div"&gt; Child div content &lt;/div&gt; &lt;/div&gt; </code></pre> <p>and if I make the HTML like the one show above it renders the child div after the complete parent HTML</p> <p>Result for the above</p> <pre><code>+---------- parent div --------------+ |Parent HTML content.................| |....................................| |....................................| |....................................| | +-----------+| | | child div || | | child div || | +-----------+| +------------------------------------+ </code></pre> <p>I'm using these styles for the child div <code>&lt;div style="width:200px; float:right;"&gt;</code></p> <p>Is it possible to float the <code>child div</code> with the parent texts if I post the <code>child div</code> after the parent texts ends</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload