Web Browsers

Bookmark Us

Web Browsers
Google Chrome Firefox Safari

Internet Explorer

Opera

In this Section we tackle the differences between the major Web Browsers in terms of how they interpret the code contained in a web page, and show you tricks and hacks to get around some of the annoying characteristics of some of the more popular browsers in use.

Background

A Web Browser is simply a computer program which translates the code which is contained in a web page such as HTML, CSS, Java and Flash into the user friendly graphical interface you see when you surf the world wide web.  As such each program is slightly different and although there has been much work by the World Wide Web Consortium to standardise the code and therefore how each Web Browser interprets it, there are still significant differences between the way that each browser displays a web page.  Care must be taken by Web Designers and Developers to test their work on each of the popular Browsers.  This can be one of the areas where designers spend most of their time, the current split in popularity is about 60% Internet Explorer, 20% Firefox and the remainder split between the other 3 main players Opera, Safari and recently Google Chrome.



IE6 PNG Fix
Internet Explorer
Wednesday, 24 June 2009 18:51

Internet Explorer 5 and 6 Ping Transparency Fix Using Java Script

Internet Explorer 6 or IE6 has a well documented problem with displaying PNG (or Portable Network Graphics) Images, this tutorial will show your an easy way to fix the IE6 PNG problem. A PNG image has an extra attribute associated with it known as Alpha Transparency, this Alpha Transparency allows each pixel in the image to have a level of transparency allowing graphic artists to create images that look visually stunning - infact much of the look and feel of the Web 2.0 revolution relies on this. Internet Explorer has only been able to support this extra attribute since Version 7 and since many web users are still running earlier releases of IE, ways have had to be devised to work around Internet Explorers Weakness.

This solution despite being conceived over 4 years ago remains the easiest way to circumvent the IE5 and IE6 png transparency problem.

First 
we need to include a few lines of code within the head section of our HTML code which will tell the user's browser (if and only if it is running IE 6 or IE 5) to have a look at a Java Script File (Which we will discuss later):





This simple script tells the visitor's browser (if and only if it is a version of IE below 7, ie IE6 and IE5), that it needs to go and read a script which is plain text of the type javascript and located in the file pngfix.js.

Note if you keep your scripts together in one file, as I do you can add that file in and if the page is in a different folder you can write:

src="/../myscriptsfile/pngfix.js"

 OK, this needs to be added to each page containing a png image, unless you are using an Content Management System, in which case it just needs to added to the index.php file of your template.

Next for the Java Script 

Click the link below, copy and paste the text into your text editor, or DW and save as pngfix.js, then save the file where you need it and bang - your pngs will work in Internet Explorer.

png.fix

Last Updated on Thursday, 25 June 2009 11:35