Revision 20258 of top

  • Revision slug: CSS/top
  • Revision title: top
  • Revision id: 20258
  • 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 in any of width,height,top or bottom.
Peculiarly, margin and its sub attributes(e.g. margin-top) will respond to % being set when no such calibrational quantity has been given to the body.

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 (body w and h are set) */
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 in any of <i>width,height,top or bottom</i>.<br>
Peculiarly, <i>margin</i> and its sub attributes(<i>e.g. margin-top</i>) will respond to <b>%</b> being set when no such calibrational quantity has been given to the <i>body</i>.
</p><p><b>e.g. CSS</b><br>
<b>/* The body could be set using px unit also for the div to operate */</b><br>
<b>body{</b><br>
width: 100%;<br>
height: 100%;<br>
<b>}</b><br>
<b>/* The div can now operate the settings with % unit (body w and h are set) */</b><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