Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to make image stay inside the div box on scrolling
    primarykey
    data
    text
    <p>I have the image position fixed inside div and code is gven below</p> <pre><code>#content{ margin-top:100px; width:900px; color:#009; border:1px solid red; overflow:hidden; display:block; } img { float:left; position:fixed; top:140px; padding:50px; } #text{ display:block; border:1px solid green; width:500px; height:1200px; float:right; overflow:scroll; } #footer{ clear:both; width:600px; height:300px; border:2x solid blue; color:#939; } </code></pre> <p>HTML is</p> <p></p> <pre><code>&lt;div id="content" &gt; &lt;img src="bar.jpg" width="46" height="639" /&gt; &lt;div id="text"&gt; ggggggggggggggggggfgdfgdfgdgdfgdgdfgdf &lt;/div&gt; &lt;/div&gt; &lt;div id="footer"&gt; Footer text &lt;/div&gt; &lt;/body&gt; </code></pre> <p>Now when i scroll down then image comes out of the content div box. IS there any way so that even if i scroll the image bar should stay inside the div box.</p> <p>The screen shot shows my problem First Screen is ok without scrolling</p> <p><a href="http://img293.imageshack.us/img293/8640/bar1k.png" rel="nofollow noreferrer">alt text http://img293.imageshack.us/img293/8640/bar1k.png</a></p> <p>But when i scroll the text full then it covers my footer as well</p> <p><a href="http://img36.imageshack.us/img36/4393/bar2z.png" rel="nofollow noreferrer">alt text http://img36.imageshack.us/img36/4393/bar2z.png</a></p> <pre><code> I want that image should scroll with the scroll bar but it should not come outside the div box . Is that possible. Basically the div box should be the boundary of the image. THe image should not come out of the div box any time but it should scroll in between that with the length of div box </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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