HTML CSS Reference/CSS Attributes and Javascript Style Properties/left
Содержание
"left" Example
<html>
<body>
<p>
<img id="myImg"
src="http://www.wbex.ru/style/logo.png"
width=74
height=100"
style="position:relative">
</p>
<input type="button"
value="Set left property to 100"
onclick="myImg.style.left=100">
<input type="button"
value="Set left property to 200"
onclick="myImg.style.left=200">
<input type="button"
value="Restore image position"
onclick="myImg.style.left=0">
</body>
</html>
"left" is applied to
+----------------+--------------------------------------------------------------+
| Applied_To |<a> <address> |
| |<applet> <b> |
| |<big> <blockquote> |
| |<button> <center> |
| |<cite> <code> |
| |currentStyle <custom> |
| |<dd> defaults |
| |<dfn> <dir> |
| |<div> <dl> |
| |<dt> <em> |
| |<embed> <fieldset> |
| |<font> <form> |
| |<hn> <hr> |
| |<i> <iframe> |
| |<img> <inputtype="button"> |
| |<input type="checkbox"> <input type="file"> |
| |<input type="image"> <input type="password"> |
| |<input type="radio"> <input type="reset"> |
| |<inputtype="submit"> <input type="text"> |
| |<isindex> <kbd> |
| |<label> <legend> |
| |<li> <listing> |
| |<marquee> <menu> |
| |<object> <ol> |
| |<p> <pre> |
| |runtimeStyle <s> |
| |<samp> <select> |
| |<small> <span> |
| |<strike> <strong> |
| |style <sub> |
| |<sup> <table> |
| |<textarea> <tt> |
| |<u> <ul> |
| |<var> <xmp> |
+----------------+--------------------------------------------------------------+
"left" Possible Values
Possible Values
auto The default; regular HTML position.
length A floating-point number followed by a unit designator.
percentage Percentage of the parent element"s width.
"left" Syntax and Note
Note:
Defines the element left edge position.
Syntax:
element { left: value }
elementID.style.left = "value"
document.all.elementID.style.left= "value" // IE only