NeverEnding NeverEnding - 1 year ago 90
HTML Question

hover over image paragraph spacing too wide

Hi communities of stack overflow

I have a problem which I'm trying to solve for hour
after I've completed the transition css, the paragraph spacing gets too wide, and it does not push down the second box in the bottom.

I have tried line-height, but to no avail. is my jsfiddle link.

While this is the result I'm trying to achieve is a screenshot of my prototype.


Apologies if it's very messy. I'm still trying to get use to this.

Answer Source

Animating line-height on hover is clearly not a good idea. For a display/hide animation, I recommend you to use javascript. Wrap the section you want to hide into a <div></div> with the CSS display: none;. Then you can use the .hover() event of jQuery (for example) and display your section with .slideToggle().

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download