Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

33 lines (33 sloc) 1.56 kB
<?xml version="1.0"?>
<entry type="method" name="outerWidth" return="Integer">
<argument name="includeMargin" optional="true" type="Boolean">
<desc>A Boolean indicating whether to include the element's margin in the calculation.</desc>
<desc>Get the current computed width for the first element in the set of matched elements, including padding and border.</desc>
<p>Returns the width of the element, along with left and right padding, border, and optionally margin, in pixels.</p>
<p>If <code>includeMargin</code> is omitted or <code>false</code>, the padding and border are included in the calculation; if <code>true</code>, the margin is also included.</p>
<p>This method is not applicable to <code>window</code> and <code>document</code> objects; for these, use <code><a href="/width">.width()</a></code> instead.</p>
<p class="image">
<img src="/resources/0042_04_06.png"/>
<desc>Get the outerWidth of a paragraph.</desc>
<code><![CDATA[var p = $("p:first");
$("p:last").text( "outerWidth:" + p.outerWidth()+ " , outerWidth(true):" + p.outerWidth(true) );
p { margin:10px;padding:5px;border:2px solid #666; }
<category slug="css"/>
<category slug="dimensions"/>
<category slug="manipulation/style-properties"/>
<category slug="version/1.2.6"/>
Jump to Line
Something went wrong with that request. Please try again.