fixed some css issues.
fixed event for more compatibility between browsers.