"css code which always looks bad in firefox/opera"
This translates to "incorrectly written CSS", and the cure for that is to learn CSS thoroughly. Look at w3schools and other CSS tutorials online, or buy a good book (I recommend "HTML Utopia: Designing Without Tables Using CSS" from Sitepoint).



