Getting the padding correct on a div using slideDown
Hello, I have a slidedown effect with a div. The padding is 15px, it is correct on the left and right, but on the top and bottom, the padding gets rid of itself after the slidedown effetct.
Here is my code:
-
$(document).ready(function() {
$("#loginButton").click(function() {
if($("#loginform").css("visibility") == "visible") {
$("#loginform").slideUp("slow", function() {
$("#loginform").css("visibility","hidden");
});
}
else {
$("#loginform").css("visibility","visible");
$("#loginform").slideDown("slow");
}
});
});
<div id="loginform" style="visibility:hidden; padding: 15px; background:#ccc;">
<table>
<tbody>
<tr><td>some stuff here...</td></tr>
</tbody>
</table>
</div>