CSS tricks
Now there have a lot of tricks for CSS to comply with different browsers such as IE6, IE7, Firefox, and Safari. Mostly majority uses the common browsers like Internet Explorer and Firefox. Therefore, what I would like to suggest is to make the CSS which you write at least look fine with these common browsers. That is, of course, I always check my website design. Here is some trick for CSS to make your site display properly in cross browser compatibility.
Here are some example of useful css.
Example 1:
- body
- { background:#336600; /* firefox */
- *background:#336600; /* IE 7 */
- _background:#ffffff; /* IE 6 */
- }
This example is quite easy and useful css code, although it doesn’t pass validation of CSS. What a shame. If you want to show you are professional, it better uses the validate CSS, I strongly suggest. Anyway, it works, try it.
Example 2:
- /* IE 6 */
- #box /**/{
- position: absolute;
- left: -210px;
- top: 230px;
- }
- /* firefox and IE 7 */
- [xmlns] #box {
- position: absolute;
- left: -210px;
- top: 211px;
- }
In this code, using /**/ mean to represent for IE6.
[xmlns] is using for firefox and IE 7.
Good luck for your CSS.




December 6th, 2008 at 9:40 am
Thank you Ko Naing OO,
July 7th, 2009 at 7:01 am
I think I will try to recommend this post to my friends and family, cuz it’s really helpful.
November 27th, 2009 at 4:41 pm
I don’t usually post but I enjoyed your blog a lot.
December 3rd, 2009 at 5:13 am
Thanks for the great article - I enjoyed reading it! I always enjoy looking at this blog.
December 26th, 2009 at 5:56 am
Easily, your post is really the freshest on this laudable topic. I agree with your conclusions and will eagerly look forward to your upcoming updates. Saying thank you will not be sufficient, for the wonderful lucidity in your writing. I will immediately subscribe to your feed to stay informed of any updates. Admirable work and much success in your business efforts!