<html>
<link rel="stylesheet" href="josh.css">
<body bgcolor="#FFFFFF">
<div id="Description">
			<table cellpadding="0" cellspacing="0" border="0" width="100%" class="main">
				<tr><td valign="top" class="name">width</td><td valign="top" nowrap class="compatibility">NN <span class="emphasis">4</span> IE <span class="emphasis">4</span> CSS <span class="emphasis">1</span></td>
				</tr>
				<tr>
					<td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
				</tr>
				<tr>
					<td valign="top" nowrap class="usage"><p class="literal"></p>
					</td><td valign="top" nowrap class="requirements">Inherited: No</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="description"><p>Sets the width of a block-level, replaced, and positioned
element's content width (exclusive of borders,
padding, and margins).
</p><p>IE for Windows counts left and right margins, padding, and borders
when calculating the width of an element until you reach IE 6 in
standards compatibility mode (see the <span class="literal">DOCTYPE</span>
element in Chapter 8). When observing the
CSS standards, the width applies to only the content portion of an
element, irrespective of borders, padding, or margins. This change
may have significant impact on legacy code that you are bringing up
to W3C compatibility.
</p>
					</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="csssyntax"><span class="title">CSS Syntax</span></td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td><span class="programlisting"><pre>width: <span class="replaceable">length</span> | <span class="replaceable">percentage</span> | auto</pre>
						</span></td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="value"><span class="title">Value</span></td>
				</tr>
				<tr>
					<td><p>See the discussion about length values at the beginning of this
chapter. The setting of <span class="literal">auto</span> lets the browser
determine the width of the element box based on the amount of space
required to display the content within the current window width.
</p>
					</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="initvalue"><span class="title">Initial Value</span></td>
				</tr>
				<tr>
					<td><p><span class="literal">auto</span></p>
					</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="example"><span class="title">Example</span></td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td><span class="programlisting"><pre>div#announce {position: relative; left: 30; width: 240}
textarea {width: 80%}</pre>
						</span></td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="appliesto"><span class="title">Applies To</span></td>
				</tr>
				<tr>
					<td><p>Navigator 4, all absolute-positioned elements; Internet Explorer 4,
<span class="literal">applet</span>, <span class="literal">div</span>,
<span class="literal">embed</span>, <span class="literal">fieldset</span>,
<span class="literal">hr</span>, <span class="literal">iframe</span>,
<span class="literal">img</span>, <span class="literal">input</span>,
<span class="literal">marquee</span>, <span class="literal">object</span>,
<span class="literal">span</span>, <span class="literal">table</span>, and
<span class="literal">textarea</span> elements; Internet Explorer 5 and
Netscape 6, all elements except nonreplaced inline elements, table
column elements, and column group elements.
</p>
					</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="objectmodelreference"><span class="title">Object Model Reference</span></td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td><span class="programlisting"><pre>[window.]document.getElementById("<span class="replaceable">elementID</span>").style.width</pre>
						</span></td>
				</tr>
			</table>
		</div>

</body>
</html>