How to say "thank you for ..."? In order to say "thank you", I can say 谢谢 or 谢谢你. What if I want to be more specific and say "thank you for (something)"? 

As an example, suppose I was invited for dinner at someone's place, and I want to write a card to the host on which I say "thank you for inviting me for dinner", how would I say that? Or how would I say "thank you for the gift"?
Same as English just without the for.

谢谢 + what.

"thank you for the gift" = 谢谢 + 礼物 － maybe you would say 你送给我的礼物 or just 你的礼物

"you for inviting me for dinner" = 谢谢 + 邀请 + 晚餐 - so altogether you would say 谢谢你那天邀请我吃晚饭 (which is for what already happened - seeing as you're writing a card, so obviously you're thanking for the dinner you've already eaten and not just for the invitation for an upcoming dinner)