top

  • Revision slug: CSS/top
  • Revision title: top
  • Revision id: 20256
  • Created:
  • Creator: Nicephotog
  • Is current revision? No
  • Comment /* Summary */

Revision Content

Summary

With mozila.org browsers, when positioning a box element, there are distinct settings and requirements for usage of the measurement calibrational units. When a box is positioned it can be given its measurement for top in pixels (px) value {{mediawiki.external('Re <b>bottom</b> : <length> ')}}. However when a percentage (%) is used, it requires to calibrate the sizing from a parent boxs' setting. Until the body in the CSS style or sheet is set (for width and height of can be percentage e.g. 100%) then the deeper box elements will not respond to a declared % setting.

e.g. CSS /* The body could be set using px unit also for the div to operate */
body{
width: 100%;
height: 100%;
}
/* The div can now operate the settings with % unit */
div{
position:absolute;
left:15%;
top:30%;
bottom:30%;
width:70%;
height:40%;
text-align:left;
border: 3px rgb(0,0,0) solid;
}

For syntax and examplification the attribute has the same usage and inputs as CSS:bottom.

Revision Source

<h3 name="Summary"> Summary </h3>
<p>With mozila.org browsers, when positioning a box element, there are distinct
settings and requirements for usage of the <b>measurement calibrational units</b>.
When a box is positioned it can be given its measurement for <b>top</b> in pixels
(<b>px</b>) value {{mediawiki.external('Re &lt;b&gt;bottom&lt;/b&gt; : &lt;length&gt; ')}}.
However when a percentage (<b>%</b>) is used, it requires to calibrate the sizing from
a parent boxs' setting. Until the <b>body</b> in the CSS style or sheet is set (for
<b>width</b> and <b>height</b> of can be percentage e.g. 100%) then the deeper box elements
will not respond to a declared <b>%</b> setting.
</p><p>e.g. CSS
/* The body could be set using px unit also for the div to operate */<br>
<b>body{</b><br>
width: 100%;<br>
height: 100%;<br>
<b>}</b><br>
/* The div can now operate the settings with % unit */<br>
<b>div{</b><br>
<b>position:absolute;</b><br>
left:15%;<br>
<i><b>top:30%;</b></i><br>
bottom:30%;<br>
width:70%;<br>
height:40%;<br>
text-align:left;<br>
border: 3px rgb(0,0,0) solid;<br>
<b>}</b><br>
</p><p>For syntax and examplification the attribute has the same usage and inputs as <b>CSS:bottom</b>.
</p>
Revert to this revision