Why does my switch trip the breaker after light fixture replacement?
You have a typical switch loop, like so (green is bare ground, which you may not have):


(source: do-it-yourself-help.com)  

However, your white and black to the switch may be reversed. Really, it doesn't matter, though. Connect the white from the source and one of the switch legs to the fixture. Connect black from the source and the other switch leg. 

To clarify, you want power running through the switch, then through the light, with no other possible path. 

When you connected things the way you did, you set it up so that flipping the switch resulted in a direct short. That's bad, obviously. I suggest brushing up on basic electrical theory before tackling any more wiring projects.