Skip to main content

Search and Top Navigation

#4228 open bug ()

Opened February 25, 2009 09:11AM UTC

Last modified January 25, 2013 09:22PM UTC

margin: #px auto; not respected with effects

Reported by: ChronoworX Owned by:
Priority: major Milestone: none
Component: ui.effects.core Version: 1.6rc6
Keywords: margin, auto, effect Cc:
Blocked by: Blocking:
Description

== Description ==

If an object has a margin: #px auto; CSS decleration used for centering, adding an effect like 'shake' or 'bounce' causes the object to be aligned to the left (disrespecting the 'auto' part in the margin decleration) in the following browers:

Opera 9(.63), FF 2(.0.0.20), FF 3(.0.6) and IE 6

Also, the content below this object snaps to a lower position during the animation in the browsers mentioned above AND:

Safari 4(public beta 5528.16), WebKit (nightly build), Chrome (1.0.154.48)

== Expected behaviour ==

The object should stay centered during the animation (of course, taking the offsets of the animation into account).

Attachments (1)
Change History (11)

Changed February 27, 2009 03:15PM UTC by jzaefferer comment:1

milestone: TBD1.next

Changed February 27, 2009 03:18PM UTC by jzaefferer comment:2

milestone: 1.next1.7

Changed March 08, 2009 02:43PM UTC by rdworth comment:3

milestone: 1.71.8

Changed February 22, 2011 04:56PM UTC by Chevex comment:4

_comment0: I am encountering this issue. I would just like to add that it also left aligns in IE 7 and IE 8. It works properly in Chrome and IE9.1298393882708989

I am encountering this issue. I would just like to add that it also left aligns in IE 7 and IE 8. It works properly in Chrome and IE9. I know this issue is present in JQuery UI 1.8.9.

Changed March 21, 2011 06:31PM UTC by gnarf comment:5

#6120 is a duplicate of this ticket.

Changed March 21, 2011 06:32PM UTC by gnarf comment:6

http://bugs.jqueryui.com/ticket/6120 has some code that may help find the solution...

Changed March 28, 2011 02:36PM UTC by gnarf comment:7

status: newopen

http://jsfiddle.net/gnarf/vmL38/ for a jsfiddle test case - note this seems to happen with almost every effect...

Changed May 16, 2011 06:59AM UTC by tomykaira comment:8

https://github.com/tomykaira/jquery-ui/tree/bug_4228

Here is a patch.

The width of wrapper is 100%, when the block is not floating. This makes the original margin setting work correctly.

Changed June 09, 2011 06:22PM UTC by scottgonzalez comment:9

not landed, but useful for reference: https://github.com/jquery/jquery-ui/pull/285

Changed October 11, 2012 02:42PM UTC by scottgonzalez comment:10

milestone: 1.9.01.10.0

Changed January 25, 2013 09:22PM UTC by tj.vantoll comment:11

milestone: 1.10.0none