I suggest adding an additional element element inside the inline-block element inline-block instead.
<div style='display:inline-block;'> <div id='fadmein'>....</div> </div> $('#fademein').fadeIn();
I know this is additional markup, but this is probably the most pragmatic solution to the problem.
An alternative would be to use the jQuery animate() method to change the opacity, and not to use fadeIn() . This will only change the opacity property; therefore, the display property will not be touched.
Spudley
source share