Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I think that what do you want is almost impossible with just pure HTML + CSS. </p> <p>What may work for you is something like this one I did: <a href="http://jsfiddle.net/fmZAm/" rel="nofollow">http://jsfiddle.net/fmZAm/</a></p> <p>HTML:</p> <pre><code>&lt;div class="main"&gt; &lt;div class="left"&gt;&lt;/div&gt; &lt;div class="right"&gt; &lt;div class="fixed_content"&gt;&lt;/div&gt; &lt;/div&gt; &lt;/div&gt; </code></pre> <p>CSS:</p> <pre><code>div.main { min-height: 500px; /* force some height */ min-width: 300px; /* min width to show content */ text-align: center; /* center content when in vertical responsive mode */ font-size: 0px; /* remove blank space from 'inline-block' display */ } div.main &gt; div /* left and right divs */ { width: 100%; /* force both to have as max width as possible */ min-height: inherit; /* same min height as parent */ min-width: inherit; /* same min width as parent to show content */ display: inline-block; } div.left { max-width: 58%; /* 100% width from max of 58% parent width */ background-color: lightgreen; } div.right { max-width: 42%; /* 100% width from max of 42% parent width */ text-align: right; /* put child 'inline-block' divs to the right */ background-color: dodgerblue; } div.right &gt; div.fixed_content { width: 300px; /* set the 300px right div you want */ min-height: inherit; /* same min height as parent */ background: orange; display: inline-block; } </code></pre> <p>As both divs (left and right) will have % widths, both will resize based on the current max width, but you'll have your fixed width div inside of the right div. So, when your right div resize to 300px width (the fixed with of its child div) it will go below the left div.</p> <p>Hope it helps!</p>
    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.
    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