Technology

The Quest for Web Standards...

Exploring the challenges of adhering to 100% web standards in website development, including cross-browser compatibility issues with JavaScript and PNG Alpha Transparency in IE6.

Sangrak

Yesterday, I embarked on a journey to create a site with the intention of adhering to 100% web standards.

However, making sure that JavaScript works across all browsers proved to be a time-consuming task, with just the menu implementation taking up five hours. Moreover, there's the dilemma of handling PNG Alpha Transparency in IE6, which does not support it.

When you hover over the black menu Bar, JavaScript activates, automatically expanding the menu. But this process triggered an error in IE6, where every time you adjust the DIV size through JavaScript, it attempts to reload the background-image. Ideally, if it loads correctly, all is well. But IE6 sometimes fails to catch the right moment to load the image if the mouse moves too quickly, resulting in an inability to display the image. Therefore, one might consider abandoning IE6 in the worst-case scenario (though that's not ideal).

For now, IE7 (haven't tested IE8), Safari, Chrome, and Opera all display nearly identically, with only about a pixel difference in spacing.

The entire process is managed through CSS files, which causes a lot of confusion. Naming conventions need to be precise, which I found challenging. This led to extensive commenting in the CSS files.

[caption id="" align="aligncenter" width="327" caption="An error where the background image disappears suddenly in IE6 when the mouse is moved over and away from the JavaScript-enabled menu multiple times"] [/caption]

[caption id="" align="aligncenter" width="418" caption="An error where the DIV settings are not correctly applied in IE6"] [/caption]

I really dislike IE6!

More on this topic