CSS Hacks

Fix Browser Styles – CSS hacks for Firefox, Chrome, Safari and IE

With the advancement of technology, Web browsers plays a central role. Web browsers made it easier for making a connection with World. It is also very important for each website to look perfect on all modern browsers. I was working on a project few days ago & I got some browser based style bugs. It was very annoying because my stylesheet was working fine on some browsers. I got some incompatibility issues only on one Internet browsers so I tried some CSS Hacks. I spent few hours for finding the right solution. Finally, I found the solution and used the media queries to target the specific browsers. It’s an amazing solution that helped me to make my project look perfect on all modern browsers. I’ve complied these below codes to help other people. Browser Fixes: We can use below mentioned CSS Hacks to target all modern Web Browsers. Firefox Only CSS Hack /* FireFox 3 and Up */ html>/**/body .someClass, x:-moz-any-link, x:default {left:1em !important} Internet Explorer CSS Hacks: /* for IE6 */ *html .someClass {color:red} /* for IE7 */ *:first-child + html .someClass {color:red} /* inline IE7 CSS */ .someElement { color:blue; /* all browsers */ *color:red } /* inline…