Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

CSS CSS Transitions and Transforms Adding 3D Effects with CSS Build a Rotating 3D Cube

Sherrie Jeffers
seal-mask
.a{fill-rule:evenodd;}techdegree
Sherrie Jeffers
Front End Web Development Techdegree Student 7,909 Points

I dont understand why this code is broken - my photos are taking up the entire screen

https://w.trhou.se/n96jrtuy68

here's my snapshot. I have paused the vide at 4:50 ish because the website he pulled up looks nothing like mine...

4 Answers

Steven Parker
Steven Parker
231,269 Points

Your css/interactions.css file has a number of differences from the one used in the video:

  • yours defines ".photocube" instead of ".photo-cube" (with a hyphen)
  • the definition for ".cube-container" does not have a value for the "perspective" property
  • the combined sides definition is missing a couple of properties
  • the individual definitions for each side are missing
Nnanna Okoli
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Nnanna Okoli
Front End Web Development Techdegree Graduate 19,181 Points

Ignore my previous comment. I found the error which was my fault.

There was a typo within the css/interation.css folder line 25... I forgot to add the full property of transform-style: preserve-3d.

Once I corrected this I achieved the desired 3D effects :D #winning

Chris Freeman
Chris Freeman
Treehouse Moderator 68,441 Points

Un-marking as best answer, since it only resolves Nnanna Okoli’s piggybacked question and not the OP.

Nnanna Okoli
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Nnanna Okoli
Front End Web Development Techdegree Graduate 19,181 Points

Hi there,

Could you help with my TH Workspace please, I tried to imitate the code shown on the tutorial and included the update coded due to the rendering changes on browser screens but unfortunately, I still was not able to achieve the 3D desired effects...

My snapshot - https://w.trhou.se/g2c69787o6

Steven Parker
Steven Parker
231,269 Points

Good job resolving your own issue! :+1:

For future issues, it's better to start a fresh question than ask one as an "answer" to someone else's.