Reverse CSS Challenge

Every one seems to be running CSS challenges these days. I launched mine a well over a year ago, Its a bit different from most of the others though and is designed to be a test of your table coding skills, If the truth be told I hadn’t thought much about it until I received an e-mail the other day (received in the process of relocation, hence the lack of updates to the site as my computer has been in a box). As with most e-mails It either praises my site or disses it, guess which one this comes under.

I was going to take up your challenge but then I looked at your example page in four different browsers, IE6, Moz1.4 Op7.2 and Firebird0.6 and it looks different in each. My question was going to be “Which version is the desired one” but the I thought better.

If you’re going to challenge table layouts then you should at least be sure that your page looks the same in the common browsers.

Not to mention that the content of the boxes on your example page spills out of its containing box when the window is narrowed.

You’re right, No one can make a table layout that misbehaves that way.

I challenge you to publish this e-mail.

Ephraim F. Moya

Hey challenge accepted, now accept mine! Seriously though now I am no longer a student but in full time employment I’m going to put up a prize and set a date for entry.

If you want a chance to win then get your entries in for the 27th of September. The prize is a valuable link in the sidebar on my front page (assuming it’s not a dodgy site), a couple of CD’s that I don’t listen to any more and any miscellaneous goodies I pull together at the last minute (a set of signed juggling balls perhaps, signed by me). I’ll ship it pretty much anywhere in the world so feel free to enter, if shipping costs get too much though the prize gets smaller! If you want to enter then create your design and send me a note letting me know where you’ve put it. If there are any problems then drop me a note and I’ll see what can be done. The winner will be announced on the 29th.

Oh yeah Ephraim, just one site for you to look at, KPMG
No one can make a table layout that misbehaves that way, but I can find plenty that misbehave in other ways.

Tables, CSS, Accessibility, Again…

Over on the Isolani site there is a good article discussing the accessibility problems of layout tables in HTML. As usual Iso takes quite a harsh line against the use of tables for layout, unlike many critics of table layouts however he clearly and concisely expresses the reasoning behind the points raised. While I agree with the opinions expressed in that article I should note that there are voices raised supporting the use of tables for both layouts and data.

So two dissenting opinions from people who champion accessible web design. Which side of the fence should I come down to as a web developer?

Well, the short answer is I believe in CSS for layouts and tables for data. However it should be noted that CSS is not always easy. Do not be fooled your standard templates might be ok but as you try to achieve more advanced effects you begin to run into browser incompatibilities. Does this mean we should give up on CSS and return to tables for layout? Some would say yes, I would say that when your up against a deadline and using a table to get a particular layout would take five minutes but could take a couple of hours to get right in CSS, you are tempted.

What does this teach? CSS can be hard. In my opinion if you want to be a professional in the web design game you have to learn some of the hard stuff now and again or you will sink into a pit of stagnant mediocrity. Learn it when your not under pressure, experiment and have a bit of passion about you chosen field.

C# goodies

This is just a quick entry to point out a couple of really cool tools for C# that I’ve added to my home brew development setup and have been using in my development work recently.

Design By Contract

Bertrand Meyer has written one of my all time favourite books on object orientation. The “design by contract” concept is a powerful one, however I don’t have time to do it justice, suffice to say I recommend the book if you can get hold of it. Kevin McFarlane is the guy behind a C# implementation of the concept, and I like it. Checking the comments made about Kevins article suggests that there might be an alternative method of accomplishing assertion checking using attributes.

Ant build tool

I came across Ant recently while developing a Tomcat based Java project. I was impressed with its flexibility and started out looking for a .Net version, little did I know that Ant already had a few .Net tasks hidden away, oh yes. Using a text editor to do my programming, rather than an IDE, means that having a good build tool comes in very useful.

NUnit unit-testing framework

NUnit finishes of this little trio by introducing a testing suite into the mix. This is what I use whenever I work with my home brew coding setup. It keeps me sane by making sure I know when I break something, if you haven’t got a testing system set up then you should really think about it.

Recommended Reading

How to work around small fonts in Internet Explorer

This item will show some of the common methods of dealing with text that is too small to read in Internet Explorer. In addition to the common methods I will also demonstrate a technique I developed myself. Internet Explorer users have can have problems with font sizing that other browser users do not have. These are related to two root causes:

  1. Limit of five levels of text sizing.
  2. Some text cannot be resized. (Fonts specified using “px” values in CSS)
Screenshot showing Internet Explorers menu option to alter text size

The limited level of text zoom Internet Explorer offers can be compensated for using screen magnification utilities. The second problem can also be overcome using some of Internet Explorers accessibility options available from the tools menu. In recent versions of Internet Explorer going to the Tools menu and selecting the “Internet Options…” item will give you access to configuration options that can modify how Internet Explorer displays pages. Under the “General” tab there should be a button for accessibility options usually labelled “Accessibility…“. Selecting this button will open the screen for setting accessibility options.

Accessibility Dialog box showing option to ignore specified font sizes

The screen shot above shows the accessibility dialog, the important point to note here is the option to “Ignore font sizes specified on Web pages“. This option is the important one because many web pages are set up to use small text by default. There are some web sites where the size of text cannot be increased by Internet Explorer. By ignoring font sizes pages that try too set a really small font won’t be able to do so.

The uncommon solution

After briefly outlining two ways you can adjust Internet Explorers settings to better suit a persons preferred text size I’ll outline another method I have developed, however first of all I’ll identify a couple of weaknesses in the methods outlined above.

  1. Ignoring font sizes can break the layout of a page.
  2. Ignoring text sizes does not allow images containing text to be resized.
  3. A screen magnifier can be troublesome to start and use if you only need it occasionally.

I developed a couple of bookmarklet links for Internet Explorer that will resize a web page, including its graphics, to make the page more readable. This method has the advantage that it preserves the layout of the page and enlarges pictures as well as text. The two bookmarklets are my Zoom +25% bookmarklet that will zoom in on a page by 25% each time it is clicked, and my Zoom 100% bookmarklet that returns a page to its original size. These can be placed on the links bar so they are always available to click on and zoom in on a page. If you have Internet Explorer you can test if they work for you by clicking on the links in this page.

Two bookmarklets availabel from the link bar

To add these bookmarklets to your link bar you need to first make sure the link bar is visible, go to “View“, “Toolbars” and check that “Links” is selected. Drag the links bar so it is big enough to put the links on (the toolbars may be stop you resizing them, if so you need to unlock them by removing the check next to “Lock the toolbars” in the toolbars menu). When the links bar is big enough for them just click on the two links (Zoom +25%, Zoom 100%), keep the mouse button held down, and drag them to the toolbar, then let go. The links should be visible on the toolbar as shown in the screen shot above.

These bookmarklets do not work with other browsers such as Opera or Mozilla, however these browsers have generally better text resizing than Internet Explorer to start with and so don’t require these workarounds.

Update: This guy seems to have come up with a similar idea to mine.

Thinking Of “Refactoring”? Not Got Any Unit Tests In Place? Bad Coder!

Refactoring is the process of changing a software system in such a way that it does not alter the external behaviour of the code yet improves its internal structure.

Martin Fowler

I believe that sometimes code needs to be refactored. For example, an improvement in the internal structure of a software system is sometimes necessary in order to improve its extensibility. All too often however refactoring is taken to mean ripping out the guts of the system and starting again. It is a common problem that programmers will try to make the move to cleaner code by throwing out the existing body of work and beginning from scratch.

To be effective refactoring needs to be understood for what it really is. There are a couple of keys to effective use of refactoring in a project:

  • Refactor in small iterations. After each iteration the external behaviour should be the same.
  • Check that the external behaviour remains the same! This is where you run the test suite. You do have one don’t you?
  • Modifying or adding functionality is not refactoring! They are separate steps, keep them separate (using small refactoring steps reduces the temptation to merge these different processes)

Without rigorous testing of refactored code can you be sure that the code is functionally equivalent? If you are “refactoring” code and not testing it then you are potentially introducing bugs for no external benefit! I am reminded of a quote from Lou Montulli:

I laughed heartily as I got questions from one of my former employees about FTP code the he was rewriting. It had taken 3 years of tuning to get code that could read the 60 different types of FTP servers, those 5000 lines of code may have looked ugly, but at least they worked.

You cannot refactor code if you do not understand what its external behaviour is. When you perform refactoring in small steps with frequent testing then you will begin to get the benefits from it. Two key insights to refactoring are:

  1. It’s easier to rearrange the code correctly if you don’t simultaneously try to change its functionality.
  2. It’s easier to change functionality when you have clean (refactored) code.

I cover this subject today because of a discussion I was involved in concerning the CSS property visibility and its value collapse. In investigating the situation with respect to the rendering of these properties I discovered that it was rendered incorrectly in a variety of browsers. Investigating whether this had been brought up in bug tracking system of the mozilla project I came across bug number 77019. The problem had been identified, reading the comments on the bug I came across this beauty of a comment:

Oh Noooooo, we had the collapse code working in the tree for years and it was simply optimized away. Hmm may be optimized is not the correct word for it.

And here lies the moral of this tale, refactoring without understanding the existing code or without rigorous testing equals the introduction of both regressions and new errors into the software system.

Recommended Reading

Independents Day To Relaunch

This is just a quick pointer to Independents Day. It appears there is going to be a relaunch of independents day.


WE HAVE NO GRIPE with for-profit sites, and many of us contribute to such businesses. But we also believe that the web is a remarkable medium for new forms of art, personal storytelling, and all manner of information and services whose rewards are not necessarily financial.

The independent content scene is alive and well, but is largely unknown by the general web-using public.

We seek to support each other as a community, and to increase, if possible, the general public’s awareness not only of existing independent sites, but of the fact that they can create their own.

I joined Independents Day “back in the day”. Independent content has become far more well known among the web community due to the adoption of blogging and similar activities. I am interested to see how independents day proposes to support independent content creation and promote participation among the general public.

Mozilla Foundation Setup as AOL Dumps Netscape

AOL has unceremoniously dumped Netscape and its accompanying open source browser suite, Mozilla. Netscape (the commercial version of the Mozilla suite) is dead, Mozilla still has a future; an independent non-profit organisation called the Mozilla Foundation has been setup with support from Sun, IBM and AOL (so AOL haven’t completely cut off Mozilla then).

The announcement concerning the formation of the Mozilla Foundation lists some of the contributions that have been made to help keep Mozilla running, AOL for instance has pledged $2 million to the Mozilla Foundation, spaced over the next two years, as well as equipment and domain names to help launch the new venture.

Death of Netscape, Rebirth of Mozilla?

Mozilla is now under the auspices of the Mozilla Foundation, a non-profit organisation. What does this mean? Interested companies can donate money essentially for free; the sums donated can be offset against their taxes. In this way the cost of supporting Mozilla will not be a significant burden to the corporate supporters listed previously. Mozilla is no longer tied to doing things the “Netscape” way, the monolithic applications that have blighted Netscape and Mozilla can now be done away with as Firebird and Thunderbird begin to take hold.

My first impressions are that this could be a good move for Mozilla in the long term. The crucial element is that the transition goes smoothly. There are encouraging signs already such as the very nicely redesigned front page of which gives much more emphasis to the products, is cleaner looking and really showcases the mozilla software products well. I hope that the momentum people put into the project during this transitional period will continue and take the browser from strength to strength in the future.

Site Accessibility Action Taken By RNIB

The RNIB has begun the first UK action on site accessibility. Action along these lines has been predicted by others. This is an important step by the RNIB in the promotion of accessible web design. By raising the possibility of legal action against web site, web designers now have a stick to match the carrot of creating an accessible web site.

The accessible web will not become the default for web sites without a few changes:

  1. Education of web professionals
  2. Financial motivation for site owners

From an educational perspective there are many sites out there that help to teach the “how” of accessible web design. Here are a couple to get started:

Learning new techniques is something that all web designers should be familiar with, after all how many “quality” professional web developers started out in web design? Education is something that should be undertaken by anyone who wants to make a professional career for themselves in any field, so I’m not going to talk further on that matter here.

The Big Issue (as seen from the financial trenches)

What’s the financial motivation? We’ve had the carrot of web accessibility for sometime now. If you can get a larger number of people to use your web site (such as people with visual impairments) then you can make a larger number of sales.

What’s the cost? The benefits haven’t moved a substantial number of web sites from being inaccessible to accessible! Let’s bring on the stick, the term in potentia. In other words inaccessible web sites may be seen as a future expense. An accessible web site may now be seen as a business benefit because it removes the threat of future lawsuits which cause these potential future expenses. has understood this point and when approached a few years ago by the RNIB created an accessible interface to their online store. Some companies will not have the foresight and will get stuck with the legal costs and the cost of redoing their web site.

By beginning to bring action against inaccessible web sites the RNIB has indicated that the risk factor inherent in having an inaccessible web site is real and growing. With this risk factor now clearly demonstrated the business case for creating a standards based and accessible web site is easier to make.

RNIB open letter

Below is an open letter to Julie Howell of the RNIB concerning the recent redesign of

Dear Julie,
I have written to you specifically as I know you were responsible for the campaign for good web design, I have also cc’d the webteam in on this email as it contains feedback on the new site design.

I feel that I have to write to you to express the disappointment several web designers have with the current RNIB website and the harm it causes to those of us trying to evangelise accessible web sites based around published web standards. Given the costs involved in redesigning a site it is often a difficult task to persuade companies to spend money on a redesign of their sites to make them more accessible to a wider range of people. This task is made even more difficult when business owners can point to a site such as and say “The RNIB doesn’t follow the ‘standards’, why should I?”

On my own behalf, and I am sure on behalf of many in the web design community, I would ask you to raise the issue of non compliance with the w3c specifications for both HTML and the web content accessibility guideline 1.0. Failure to comply with these guidelines, or even to attempt to comply with them, is a disappointing state of affairs.

Link to the w3c validator demonstrating the failure to pass validation, even when compensating for a missing doctype and character encoding.

The document also contains a litany of other errors that cause it to fail in many browsers, for example many of the relative links use a ” instead of a ‘/’, this is an error and breaks the links in many browsers. For example the page demonstrates these errors, for example links to RNIB advertising are provided as both
the first of which is correctly written, however the second is incorrect and relies on Internet Explorers error correction mechanisms, and fails in other browsers such as Netscape and Mozilla. When this error affects the users ability to get to content such as the “Tips for screenreader users of this site” you see how the usability of the site is severely damaged.

I think that the new design is poorly thought out with respect to accessibility and usability and sends a poor message in the campaign for accessible websites. The RNIB puts shows itself in a poor light when its own website is inaccessible and broken to a large number of users. As a professional web developer I have to state that I am disappointed in your redesign, especially as I cannot even reach many parts of the site due to the errors in coding on the site.

A couple of other points for the web team to implement, there is no default language specified using the lang attribute, this means that aural browsers cannot automatically pick the best voice to read a page in.

There are no summary attributes on the tables.

You are using large amounts of “presentational” HTML that has been depreciated, this is a tactic that focuses on visual users excessively and should be replaced by style sheets which can be targeted to different peoples browsers, visual and aural.

yours sincerely,
Benjamin Meadowcroft

After sending the letter I discovered the following response by Julie to another web designers post concerning the matter.

I read through the things that have been said so far. Some of the technical points are beyond my understanding (I’m a policy officer rather than a technical expert) but I have many colleagues who do understand that stuff and who will be able to help me appreciate the issues that have been raised.

Julie is mainly concerned with policy matters and is not directly responsible for the redesign, however she is responsible for the RNIBs accessible web site campaign which is why I directed my comments to her. It is understandable that she would not know the minutiae of web development issues that affect accessible design, however one would image that the people who are employed or contracted to develop the website for the RNIB would have a good understanding the web content accessibility guidelines and standards based web authoring. The fact is that the current state of affairs is extremely poor and a blow against the evangelism of accessible web design.