I added another div and set position: absolute;
and the bottom to 0, then I set the parent div to position: relative;
You may have to play around with the containers to get exactly what you want other than the slide down.
<body>
<div style="width:400px;background-color:black;height: 200px;">
<div id="error" style="position: relative; background-color:red; color:white; display:none; width:120px; height: 50px;">
<div style="position: absolute; bottom: 0;">the error message</div>
</div>
</div>
<div id="button" style="margin-top:20px; background-color:gray; width:70px; cursor:pointer;">click me!</div>
</body>