Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>If I understood what you need correctly, all you need is <code>overflow: auto</code> set on <code>.outer</code>. Here's an example: <a href="http://jsfiddle.net/hgLbh/1/" rel="nofollow">http://jsfiddle.net/hgLbh/1/</a> (tested on safari &amp; chrome).</p> <p>Update:</p> <p>After your scrolling related comment I've tried a few other solutions and I've found something that satisfies even that. I'll say in advance it's dirty, but if you can handle absolutely positioned content and you are willing to duplicate the generated markup I hope it will work (at least on my local safari it does).</p> <p>The solution is to duplicate your content and wrap the new content in 2 other divs, so the HTML will look something like:</p> <pre><code>&lt;div class="outer-fixed"&gt; &lt;div class="just-a-helper-wrapper"&gt; ... user generated content &lt;/div&gt; &lt;/div&gt; &lt;div class="outer"&gt; ... same user generated content &lt;/div&gt; </code></pre> <p>And for the CSS:</p> <pre><code>.outer, .outer-fixed { background-color:red; word-wrap:break-word; position: absolute; left: 0; right: 0; } .outer-fixed { position: fixed; right: 0; } .outer-fixed * { visibility: hidden; } </code></pre> <p>I'd like to point out that the <code>just-a-helper-wrapper</code> is required only because <code>outer-fixed *</code> doesn't select text nodes (ie. content that's not in another tag) - for example the string <code>User generated content:</code> from your example would have still been visible. If you don't actually have that kind of content, you can remove it.</p> <p>Here's the link: <a href="http://jsfiddle.net/hgLbh/2/" rel="nofollow">http://jsfiddle.net/hgLbh/2/</a></p>
    singulars
    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.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      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