Junal on the run

Solving internet explorer (IE) issues …

Posted on: April 4, 2008

Few days later, developers have to test one more browser along with IE6, IE7. What is that? Well that’s going to be IE8! These current 2 IE browsers have made developers life hell and I’m sure this new one going to make no change. Although it has some new features that might help the developers but windows users don’t change their browsers by a night. Still 32-31% users use IE6! And those who use IE6 will not switch to IE8 by a jump. That means developers going to suffer at least a year (my guess).

Right now we are working on browsers compatibility. Well our latest Facebook application that is going to be released soon has Firefox compatibility. But not IE7 and IE6. One thing I have noticed that there whatever problem we found in IE6, same problem we found in IE7! Then what the hell IE7 has improved??

Certainly, I’m very naïve in this CSS/HTML area. Anupom had this solution to separate CSS class for each browser. Thanks to him for making this easier. In our CSS file we detected browsers this way; let’s say we had this general class

.h420 {



It worked fine in FF but there was height problem in IE6 and IE7. So we would detect the browsers and according to the needs we would increase/decrease the height of the class. See the example bellow….

<?php if( strpos($_SERVER[‘HTTP_USER_AGENT’], “MSIE”)!== false ): ?>

.h420 {

height:380px !important; //for both IE6 and IE7


<?php endif; ?>

Let’s put the “!important” to give it the priority. It worked fine and I guess this is the cool way to solve this kind of browsers issues. Anyways, what about if we had to separate IE6 and IE7? Well we had this solution as well….

For IE6…

<?php if( strpos($_SERVER[‘HTTP_USER_AGENT’], “MSIE 6.0”)!== false ): ?>

//write your class here ….

<?php endif; ?>

For IE7…

        <?php if( strpos($_SERVER[‘HTTP_USER_AGENT’], “MSIE 6.0”)!== false ): ?>

//write your class here ….

<?php endif; ?>

That’s it 🙂

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

View Junal Rahman's profile on LinkedIn
Subscribe to me on FriendFeed

Follow Me on Twitter


My photos

Blog Stats

  • 424,735 hits
%d bloggers like this: