Hi I’m really confuse with the absolute positioning in this tutorial.
I can’t understand why by using left: 0 on the figure tag, his actually making a margin left
of 335px, and also why when his using left it’s actually acting like right: 0.
I know that this type of problem can occur when the actual parent div is 0 width or 0
height, since his not able to display a block element
Here is part of the css code:
.ia-container figure {
position: absolute;
top: 0;
left: 50px; /* width of visible piece */
width: 335px;
box-shadow: 0 0 0 1px rgba(255,255,255,0.6);
transition: all 0.3s ease-in-out;
}
You can find the demo here:
http://tympanus.net/codrops/2012/06/06/image-accordion-with-css3/
It doesn’t.
The
leftcomes from another rule