0

I have a horizontal jQuery animated slider which works great, except as its width begins to decrease, no matter how I set up the <divs> inside they go to newline. I want them to stay on the same line to create this smooth illustion.

Here's what I mean: jsfiddle

How do I prevent them from clearing?

dsp_099
  • 5,801
  • 17
  • 72
  • 128

1 Answers1

1

use max-width instead of width:

 #container { max-width:500px; height:500px;border:2px dotted maroon; }
    .red, .blue, .green { display:inline-block;max-width: 250px; height:50px; margin:0 auto;}

here is the jsfiddle link

UPDATE: to avoid clear try jsfiddle

Hemant
  • 1,961
  • 2
  • 17
  • 27