Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>If the height is not behaving as expected, so try to set a height for <code>.column</code>. Your <code>textarea</code> is inside of a column and its height is a percentage of his father, but, <em>how high is your father?</em></p> <h2>Updated</h2> <p>You told that the <code>.center</code> layer is overlapped by the columns if you set a height to the <code>textarea</code>, right? Then we must to set the columns relative to each other and we have to explain to HTML that our <code>.center</code> should to be after our columns. To do this, follow the code:</p> <pre><code>.column { width: 48%; height: 500px; /* for example */ position: relative; /* add this to trasnform your columns relative to each other */ margin: 1%; float: left; } textarea { min-width: 100%; max-width: 100%; width: 90%; height: 90%; min-height: 80%; max-height: 80%; overflow: auto; } .center { width: 100%; /* to specify that your "center" must to occupy 100% of the width on the screen. */ position: relative; /* to transform the position to relative */ float: left; /* to accompany the columns' floating */ clear: both; text-align: center; } </code></pre> <h2>Percentage comprehension</h2> <p>Just to make things look better for you: <em>to work with percentage, we <strong>need</strong> an initial point</em>. This means that for something to have 80% of the height of something else, we need to know the height of something else.</p> <p>In other words, to <code>.something</code> have 80% of height, we need to know the height of his father, and if his father have 90% of height, the father of his father must to have a specified height. At some point, we need a defined height.</p> <h2>JavaScript alternative</h2> <p>As I said, I have worked too much with percentage measures and no success to found a solution with pure CSS 2.1. Thereat, I created this <em>mini-plugin</em> in JavaScript + jQuery. No work-a-rounds:</p> <pre><code>function calculateResponsiveHeight(couple) { for (var value in couple) { $(value) .css("height", $(couple[value].wrapper).height() - couple[value].spacing + "px"); } } </code></pre> <p>Usage:</p> <pre><code>calculateResponsiveHeight({ ".content": { spacing: 135, // how much you want to spacing your layer? wrapper: window // who is the reference point? } }); </code></pre>
    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.
 

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