Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>This seems like a really frustrating issue. The best way I can think to solve it is to remove <code>float:left</code> from <code>p</code> and replace it with <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/display" rel="nofollow"><code>display: table-cell</code></a>.</p> <pre><code>p { display: table-cell; /* replaces float:left */ max-width: 300px; background-color: lightgreen; height: 200px; } </code></pre> <p>The only problem with this approach is that it will render all the <code>margin</code> attributes useless. To work around that, you can just add the inverse of those <code>margin</code> attributes to <code>#img1</code>. For example:</p> <pre><code>p { margin-left: 10px; } </code></pre> <p>Would be replaced with:</p> <pre><code>#img1 { margin-right: 10px; } </code></pre> <p><a href="http://jsfiddle.net/Rncu6/20/" rel="nofollow"><h3>JS Fiddle Example</h3></a></p> <hr> <p><b>Caveat</b>: I don't know how small you want your minimum width to become, but you'll notice that at a certain point the <code>p</code> will still move onto the next line. This is because it is becoming too small for individual words (e.g. longer words like "paragraph") to fit on one line. To work around that, you can use the <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/word-break" rel="nofollow"><code>word-break:break-all;</code></a> attribute.</p> <pre><code>p { word-break: break-all } </code></pre> <p>That way, the width of <code>p</code> will continue to shrink until the width can no longer fit individual characters on one line.</p> <p><a href="http://jsfiddle.net/Rncu6/24/" rel="nofollow"><h3> JS Fiddle Example </h3></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. 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.
    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