Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

centering children? #2

Open
kraegpoeth opened this issue Mar 10, 2017 · 2 comments
Open

centering children? #2

kraegpoeth opened this issue Mar 10, 2017 · 2 comments

Comments

@kraegpoeth
Copy link

Any way to center animated children?
Tried with margin: auto on ReactTransistions and parent element, but it does not work...

@MikeDabrowski
Copy link

MikeDabrowski commented Mar 11, 2017

I found a workaround:
Go to node_modules>react-transitions>dist>index.js and remove or comment out line position: 'absolute', under childWrapperStyle.

Edit: removing inline-block helps too.
Edit2: previous workaround causes problems that next page does not 'push' previous away.
Better solution is to add left:0,top:0 to childWrapperStyle and to _react2.default.createElement(..) (around 90th line)

@szchenghuang
Copy link
Owner

Would you show some snippets so that I could try to help out? On the demo page there is a text block, a "Hi, there" string, being centered. Giving a look at its source may help.

Feel free to let me know how it works out!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants