audibleCode

a code repository for codes that you don’t have enough words to describe

Custom CSS for Internet Explorer 6 & 7

with one comment

I was working on my mini-project. The project was  a CMS for a school. I finished everything about it. I mean the php, mysql javascript, flash, and all that. But i had a small problem with the theme.

To be specific the CSS was different in Internet Explorer. I mean that i had to give internet explorer a different code to get the same effect in the various browsers. Firefox(my all time favorite), Safari and the rest. 

IT was only internet explorer that gave me the issues.

Let me get to it.

To set custom css code for Internet Explorer only preceed the code or line with _ .(underscore) eg.

{

     height:30px;   /* this is for all browsers*/

     _height:40px; /* this is for only internet explorer 6 ONLY*/

     *height:35px; /* this is for all version and variants of  internet explorer*/

}

I hope this post helps you.

Written by audiblecode

May 23, 2008 at 7:15 pm

One Response

Subscribe to comments with RSS.

  1. Looks good, nice and simple, I’ll give it a try in my next code. IE should be took around back and shot.

    micktay

    May 24, 2008 at 10:39 pm


Leave a Reply