Showing just some part of a div
css, jquery
Solution
You could set the div height to 50px fixed and on click you can change the height to auto per javascript/jQuery, or revert it from auto to 50px.
CSS:
.mydiv{
height:50px;
min-height:50px;
overflow:hidden;
}
jQuery:
$("document").ready(function(){
$(".mydiv").click(function(){
if($(".mydiv").css("height")!="50px"){
$(".mydiv").slideDown();
}
else{
$(".mydiv").slideUp();
}
}
}
Problem
I want to have a div which is shown just top part of it (like 50px oh height) and other (bottom like 100px) part of the div should be shown by jquery.show() or something else. Is there anyone know how to do it ?