Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <blockquote> <p>This happens because when specifying margin:auto, Chrome (and also Safari, as they both use WebKit) sets computed value of margin-left and margin-right to an equal sized used values. </p> <p>While Firefox and IE sets computed value of margin-left and margin-right to 0px. So if you have a 1000px wide page and your element takes 50% width (i.e.: 500px) and has margin:auto, then Chrome will set element's computed value of margin-left and margin-right to 250px (so it fills all the empty space between element's border edge and its parent element's content edge with margins and by so horizontally centers the element). </p> <p>However, Firefox and IE will set computed value of margin-left and margin-right to 0px, so there is no margins between the element's border edge and its parent element's content edge but it is still centered. You can actually see it happening using Firebug in Firefox and Developer Tools in Chrome. In depth explanation can be found here: </p> <p><a href="http://www.3d3r.com/simon/marginAutoComputedValue" rel="nofollow noreferrer">http://www.3d3r.com/simon/marginAutoComputedValue</a></p> </blockquote> <p><em>from <strong>smnh</strong> answer under <a href="http://api.jquery.com/position/" rel="nofollow noreferrer">jQuery position page</a></em></p> <hr> <p>remember that you can have more control with dimensions using <code>.position()</code> and <code>.offset()</code></p> <pre><code>$(id).position().left </code></pre> <p>or do you really want the <code>MarginLeft</code> ?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload