CSS or Javascript to show login

I have a link that says "Add a comment".

If you’re not logged in it shows the login page and if you are logged in it goes to the add a comment page.

I would rather that when "Add a comment" is clicked the the login / add a comment appears directly under the link. Can this be done with CSS or does it need Javascript?

Are you talking about a javascript floating window?

I am not sure what a floating window is. Do you mean like a popup window?

yes he means like a popup

Not exactly a popup, but an absolute positioned floating window, which is, technically, not a window, but a dialog box on a higher layer.

Yep, can you give me an example about using dialog model?