# Why does my wrapper work correctly in IE and Firefox

**URL:** <https://forum.kirupa.com/t/why-does-my-wrapper-work-correctly-in-ie-and-firefox/260210>\
**Category:** web dev\
**Created:** [May 13, 2008, 3:10pm UTC](https://forum.kirupa.com/t/why-does-my-wrapper-work-correctly-in-ie-and-firefox/260210 "2008-05-13T15:10:29Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![red5\_ws](https://avatars.discourse-cdn.com/v4/letter/r/e47c2d/32.png) [@red5\_ws](https://forum.kirupa.com/u/red5_ws)\
**Post date:** [May 13, 2008, 3:10pm UTC](https://forum.kirupa.com/t/why-does-my-wrapper-work-correctly-in-ie-and-firefox/260210/1 "2008-05-13T15:10:29Z")

</div>

but is way to the left in Safari ?

[http://www.classicsignature.com/](http://www.classicsignature.com/)

Thanks for any help!

---

<div class="post-metadata">

**Author:** ![pixelSnobbery](https://avatars.discourse-cdn.com/v4/letter/p/e274bd/32.png) [@pixelSnobbery](https://forum.kirupa.com/u/pixelSnobbery)\
**Post date:** [May 13, 2008, 4:16pm UTC](https://forum.kirupa.com/t/why-does-my-wrapper-work-correctly-in-ie-and-firefox/260210/2 "2008-05-13T16:16:37Z")

</div>

get rid of the margin-left attribute in your css, then set margin-left:auto, and margin-right:auto.

Should be fine after that.

---

<div class="post-metadata">

**Author:** ![fasterthanlight](https://avatars.discourse-cdn.com/v4/letter/f/ecc23a/32.png) [@fasterthanlight](https://forum.kirupa.com/u/fasterthanlight)\
**Post date:** [May 13, 2008, 4:19pm UTC](https://forum.kirupa.com/t/why-does-my-wrapper-work-correctly-in-ie-and-firefox/260210/3 "2008-05-13T16:19:39Z")

</div>

it wont, ive already fiddled with the page in firebug

everything within #wrapper is absolutely positioned, so margin: 0 auto; on your #wrapper does nothing.

Optimally you should re-write this page without absolute positioning…

---

<div class="post-metadata">

**Author:** ![red5\_ws](https://avatars.discourse-cdn.com/v4/letter/r/e47c2d/32.png) [@red5\_ws](https://forum.kirupa.com/u/red5_ws)\
**Post date:** [May 13, 2008, 6:11pm UTC](https://forum.kirupa.com/t/why-does-my-wrapper-work-correctly-in-ie-and-firefox/260210/4 "2008-05-13T18:11:15Z")

</div>

[quote=fasterthanlight™;2325632]it wont, ive already fiddled with the page in firebug

everything within #wrapper is absolutely positioned, so margin: 0 auto; on your #wrapper does nothing.

Optimally you should re-write this page without absolute positioning…[/quote]

Thank you for the response, can you please tell me what alternative method I might use and where a good tutorial for that would be. I like being able to position objects regardless of browser or resolution.

Thanks again

---

<div class="post-metadata">

**Author:** ![fasterthanlight](https://avatars.discourse-cdn.com/v4/letter/f/ecc23a/32.png) [@fasterthanlight](https://forum.kirupa.com/u/fasterthanlight)\
**Post date:** [May 13, 2008, 6:16pm UTC](https://forum.kirupa.com/t/why-does-my-wrapper-work-correctly-in-ie-and-firefox/260210/5 "2008-05-13T18:16:41Z")

</div>

Positioning objects without absolute is a lot easier…

instead of defining exact x and y coordinates, you tell the divs to behave a specific way… (this allows your divs to expand and contract to fit different content)

Use these examples with **[Firebug](http://www.getfirebug.com/)** to figure out a way to re-write your html and css

**[http://www.thenoodleincident.com/tutorials/box\_lesson/boxes.html](http://www.thenoodleincident.com/tutorials/box_lesson/boxes.html)**

The key to relative positioning, is using Floats,

which basically tell a div (not whats within a div) to “always align” to the left or right…
