17

How can I use jQuery's slideDown with display: inline-block, as opposed to the default display: block;

Some of the content inside the div I'm using requires it to be so, and the design partly breaks unless I fix it. However, fixing it after the sliding down has finished will be glitchy.

Any ideas?

Siva Charan
  • 17,940
  • 9
  • 60
  • 95

1 Answers1

26

You should probably wrap the div with display: inline-block, into another div, with simple display: none, that will be the target of your slideDown function. I made up a demo for you here http://jsfiddle.net/d3BHL/2/
Let me know if it helps

themarcuz
  • 2,573
  • 6
  • 36
  • 53
  • Thanks, that's what I ended up doing (only, with CSS3) –  Feb 29 '12 at 11:44
  • 3
    This fiddle is broken. The display styles should be the other way around: container should be inline, and the inside div should be display none. – smilebomb Aug 15 '16 at 14:43