I want to get an element in the DOM and then lookup what rules in my CSS file(s) are contributing to it\'s appearance. Similar to what firebug or webkits inspector does. Is
Is it possible? Absolutely...is it simple (especially cross-browser with IE in the mix), not so much. If you're really interested in doing this, check out the Firebug Lite CSS source here. At least the methods are decently commented showing what information each is fetching.
....or if you're wanting simply to inspect in a browser that doesn't have an inspector, just use Firebug Lite.