One major challenge for web developers is to have the site look just right on the various web browsers. While there are official standards how all the browsers are supposed to interpret HTML and CSS, in practice, each browser has its quirks, and while the page may look one way on my computer, if one is unscrupulous in web development, the page may look unexpectedly different when someone else views it.
Download major browsers
The first thing you need to do is to download all the major browsers. While most of the world will view your website through either Internet Explorer or Firefox, it’s advisable to also cover less common browsers, such as Opera, Safari, and Konqueror. These can be downloaded on their respective websites. It is also recommended to have both the most recent and previous versions of these browsers. For more complete testing, it is also advisable to have different types of operating systems and computers, such as Windows, Macintosh, and Linux, available. Another test is to install different graphic resolutions on the computers to see how the page looks when the screen is larger is smaller.
Once this is done, you need to test each web page on all the possible platforms. For more thorough testing, it is also advisable to do screenshots of each page view, paste them in a graphics program, and measure the size and spacing of everything.
This may seem quite a bit time consuming, and it really is. Whoever is paying for the development of the website will have to decide whether it is enough for the website to look just right to 95% of the world or if the extra resources should be used to perfect the site for 99% of the Internet-viewing world.
Reasons why appearance may vary
1. Bugs in different browsers
Some of the major browsers have bugs, where the HTML or CSS is not rendered correctly. Unfortunately, those reading the web page usually do not know this, so it’s the developer who looks bad, not the web browser. It’s the developer’s job to clean up after the web browser’s bugs and find the workarounds to make the site look Ok.
2. Different strictness in interpreting HTML and CSS
For example, if I write a tag <a href=”http://anywhere.com>, Internet Explorer will cover up my mistake of omitting the closing quotation mark, while Firefox will not forgive, and all the content of the page following this will be considered part of the reference, and much of the remaining content on the page will not visible. Syntax of such pages needs to be carefully checked, either manually or with an automated syntax checker, many of which are available online.
3. Different rules for inheritance..
Take the following example:
<div style=”width:10px;padding:10px”>
<div style=”width:10px”>hello</div>
</div>
In Internet Explorer, the inner DIV inherits the padding property from the outer DIV’s padding property, so it will also have a 10 pixel padding, making the overall length 10 pixels larger on each side. In Firefox, however, only the outer DIV will have the 10 pixel padding.
How to fix the appearance
1. Use debuggers
Each browser should have debugging add-ons, which can be downloaded. I use DebugBar for Internet Explorer and FireBug for Firefox. With these debuggers, one can view how the DOM is actually rendered and how the CSS is interpreted. Once I do this, I usually see where the problem is.
2. Check the Internet
Fortunately for me, when there is some quirk in a particular browser, there have been thousands of other developers who noticed it before me, some of them who will write about it on the Internet. To find articles and discussions about such issues, I formulate the key words about my issue and enter it into my favorite search engine. Additionally, many web browsers have their own forums to discuss issues specific to the browsers. Most of the time, I will find an article or discussion with a solution to the problem I am having.
Here, we see that, following a series of straight-forward steps, any web developer with basic knowledge of the major tools we use can make the site look just right for most of the Internet audience.