HTML CSS Reference/CSS Attributes and Javascript Style Properties/pixelLeft
"pixelLeft" Example
<html>
<head>
<script language="JavaScript">
function function1(){
document.all.myDiv.style.pixelLeft = 500;
}
</script>
</head>
<body>
<div id="myDiv"
style="background-color:#ccffcc;
position:absolute;
width:300;
cursor:hand";
onclick="function1()">
Click to send it to 500 px from the left.
</div>
</body>
</html>
"pixelLeft" is applied to
+----------------+--------------------------------------------------------------+
| Applied_To |<a> <acronym> |
| |<address> <applet> |
| |<b> <base> |
| |<basefont> <big> |
| |<blockquote> <body> |
| |<button> <caption> |
| |<center> <cite> |
| |<code> <col> |
| |<colgroup> <comment> |
| |<custom> <dd> |
| |defaults <del> |
| |<dfn> <dir> |
| |<div> <dl> |
| |<dt> <em> |
| |<embed> <fieldset> |
| |<font> <form> |
| |<frame> <frameset> |
| |<head> <hn> |
| |<hr> <i> |
| |<iframe> <img> |
| |<input type="button"> <input type="checkbox"> |
| |<inputtype="file"> <input type="image"> |
| |<input type="password"> <input type="radio"> |
| |<input type="reset"> <input type="submit"> |
| |<input type="text"> <ins> |
| |<kbd> <label> |
| |<legend> <li> |
| |<link> <listing> |
| |<marquee> <menu> |
| |<meta> nextID |
| |<nobr> <object> |
| |<ol> <option> |
| |<p> <pre> |
| |<q> <rt> |
| |<ruby> runtimeStyle |
| |<s> <samp> |
| |<script> <select> |
| |<small> <span> |
| |<strike> <strong> |
| |style <sub> |
| |<sup> <table> |
| |<tbody> <td> |
| |<textarea> <tfoot> |
| |<th> <thead> |
| |<title> <tr> |
| |<tt> <u> |
| |<ul> <var> |
| |<xmp> |
+----------------+--------------------------------------------------------------+
"pixelLeft" Syntax and Note
Note:
JavaScript-only style properties
Set the left position.
These properties are equivalent to the CSS- compatible
left style properties.
Syntax:
elementID.style.pixelLeft = "value"
document.all.elementID.style.pixelLeft = "value"