Omid
Omid

Reputation: 4715

expand a div from both side (up and down)

When we use slideDown or Up it slides the element up or down from bottom. is there a way to slide that from both side without centering the element continuously ?

edit:
element is absolute and should start sliding from center of page.

Upvotes: 1

Views: 777

Answers (2)

Andy
Andy

Reputation: 30135

Yes, position the div using position:absolute and bottom:..px for example

Upvotes: 1

Madara's Ghost
Madara's Ghost

Reputation: 174977

Instead of using slideDown, animate the element's height and margin-top.

Here's an example

Upvotes: 2

Related Questions