basically specify the browsers matrix that u are targetting since getting a 100% browser comapatible is not an easy job and sometimes to get it you will be sacrificing performance... however following the W3C standards should give a consistent UI on all browsers (check link: http://www.w3.org/standards/webdesign/ ).per testing browsers compatibilty there are good tools that can be used here,unfortuantely the best are not free but the free ones are good like http://www.my-debugbar.com/wiki/IETester/HomePage : this one is for IE browsers.
As Rahaf Nawash said first you need to specify you targeted browser, then you could use tools to help you make you webapp/website as browser compatible as possible, somethings like:
modernizr
bootstrap