I have a jQuery Thickbox window and I want to make it stick as far as possible to the top of the browser window, so the top is visible.

If the bottom is not visible, this (for now) is not a problem.

How can I do it?

Use CSS. You will want to set the display property to fixed (if you don't want it to scroll with the page) or absolute (if you do want it to scroll with the page). You will want to set the top property to 0.

hmmm....is there another way to do it/calculate it using margin top/bottom?

Sure you could, but CSS would be the easiest and most accurate. Just you the developer tool bar (firebug, IE devtoolbar or Chrome's) to help you figure out the selector you need to use for the CSS.

What do you mean by "so the top is visible"? The top of the thickbox or some other header on the top of the page?