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

set the cube's position on the screen #2

Open
davidAgo4g opened this issue Jun 9, 2012 · 1 comment
Open

set the cube's position on the screen #2

davidAgo4g opened this issue Jun 9, 2012 · 1 comment

Comments

@davidAgo4g
Copy link

I suggests not to place fixed dimensions in cube.css in the section
.csstransitions.csstransforms .deck-container:not(.deck-menu) > .slide
like:

 top: 0;
 left: 50%;
 margin-left: -400px;
 width: 800px;

If I understood correctly you had tried to place the cube at the center moving it with left:50% and then moving at the left with the half of his width width: 800px with margin-left: -400px.
So try to replace that code with this:

  top: 10%;
  left: 10%;
  width: 80%;
  height: 80%;
@mikeharris100
Copy link
Owner

Hi!

Thanks for the input. But the problem is with the transforms. The translateZ value cannot be a percentage. To keep things from looking weird we need to translate Z by the same value we translate X, and the value by which we translate X needs to be half the width of the cube. So in order to do that we need to keep things fixed, I think.

If you know a way around this I'd love to hear it!

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

2 participants