0

I have an accordion slider. I have a problem with the slider label text, which is not sliding when clicked. Here is the URL to my site.

CSS for the text:

.accordion label h7{ 
position: absolute;
cursor:pointer; 
display: block;
-webkit-backface-visibility: hidden; /* fixes chrome bug */
-webkit-transform: translateX(-100%) rotate(-90deg); 
-webkit-transform-origin: right top; 
-moz-transform: translateX(-100%) rotate(-90deg);
-moz-transform-origin: right top; 
-o-transform: translateX(-100%) rotate(-90deg); 
-o-transform-origin: right top; 
transform: translateX(-100%) rotate(-90deg); 
transform-origin: right top;
}

What am I missing? Is their a way to make the slider auto slider with some seconds lag?

  • I'm not getting the problem. For me the site looks fine. Could you maybe create a [jsfiddle](http://jsfiddle.net/) that is only showing the isolated problem? Also, what browsers does the problem occur in? – Elmar Peise Apr 20 '13 at 11:28

2 Answers2

2

The problem is that .accordion label h7 is set to position:absolute. If you remove that you'll notice the text begins to slide.

A fix I found for the resulting bunched text is to set a width to .accordion label h7.

.accordion label h7 {
    width: 200px;
}
JSW189
  • 6,267
  • 11
  • 44
  • 72
0

The text is sliding, but it is not getting updated. As soon as some CSS properties change, the text jumps to the right position. So maybe try changing a CSS property before you start to animate the text and remove it again after your animation is complete (something like border-color which no one will ever see). (Relevant SO question)

Community
  • 1
  • 1
darthmaim
  • 4,970
  • 1
  • 27
  • 40