Sunday, April 22, 2007

floating about, or about floating

First the good news. I finally figured out how to center the contents on Ryan Hiller Music. The next link should pop up a page with a song that you can listen to while you read this post.

Now for the rant. This is about the type of garbage that makes web programming miserable.

NOTE: I've spent about $300 bucks on CSS books and have tossed several hundred frustrating hours into trying to find good ways to render pages with multiple columns with CSS. You know, that stuff that took all of 8 minutes to learn using the venerable TABLE tag.

Anyway, on Ryan's site, I wanted to use the FLOAT method of page layout.

The basic idea of the float method is to create an outer division of a fixed size, then to let the elements of the page float in this known block. Setting the left and right margins to auto affectively centers the page. Several of my expensive books suggest taking this route.

On Ryan's page the outer division is 640px. The first item in the page is a picture of width 200x200. The next item is a logo that is 440x120px. 200 + 440 adds up to a width of 640px. Notice that I have a blank spot under the logo that is 440x80px. The next division is a menu in a 440x24px box and a header that is 440x56. Since the outer box is 640px in width, the inner elements will just float into place. I can then add addition blocks of information below.

If you have a fixed outer box, you can adjust the sizes of all the elements so that they float into place.

This is all well and good. For that matter, the page rendered perfectly in Internet Explorer. I spent several days struggling to get the page rendered in Opera and Mozilla. I read several hundred online pages on web design. I did search after search on Google, and then finally conceded defeat. (This was 2002). I fell back on a crappy absolute position design that I severely disliked.

I took up the problem again in 2007. The float model renders easily in internet explorer, but not in Firefox.

Fortunately several thousand other people had the same problems. There is now a large number of pages talking about the subject. For example, here is a 2006 thread on WebMaster World. It turns out that to get the CSS to display the way I want, I need to add the line "overflow:auto;" in the outer division tag.

What I gleaned from the other pages is that the originators of CSS thought that one item floating in another item was logically absurd. It would be like someone putting a swimming pool on a cruise ship.

Imagine an ice cube floating in a martini glass held by a tanned young woman floating in a pool that is in a yacht floating in the Caribbean. The very notion is absurd. I refuse to believe that such an event could happen. Yes, you can buy be a ticket on a cruise ship. But I won't concede this point … until I've rubbed some suntan lotion on the shoulders of that young lady.

Now for the big controversy: Microsoft rendered the page as people would expect. When writing internet explorer; a programmer at Microsoft decided that if a person put one division inside another division, they probably wanted the inner box to be displayed inside the inner box.

This is the weird part. On reading pages from different CSS gurus, most of them are angry at Microsoft for displaying the page in the way that people would expect the page displayed.

Many of the CSS gurus are extremely passionate in deriding Microsoft for not being "compliant" on this issue.

Quite frankly, I think the gurus are sick.

In a healthy society, standards are an organic, changing thing. In the first decades of the computer industry, all of the applicable standards evolved rapidly with technology. The ie browser had a more intuitive implementation of the CSS standard. In a healthy world, the standard would change.

Like almost all ideas. The first iteration of CSS was buggy. In a healthy world, the players in the industry try finding different ways to implement the standards, and gradually work out the bugs through better implementation, or by changing the standards.

What seems to have happened with CSS is that the thugs at the standards committee have made an intentional effort to stop the natural evolution of CSS, and are engaged in a group thrashing of Microsoft. They are taking all of the bugs of the first CSS implementations that Microsoft did not implement, then trying to say that Microsoft is evil for not implementing the bugs.

The method is simple. A group defines an enemy then systematically attacks their defined enemy. When people fall into this mindset, they fall into oblivion where they are incapable of doing those things that can make society better.

When tracing down these CSS bugs, the patterns seems to be that the standards committees are intentional preventing the improvement of CSS simply so that they can throw the accusation of noncompliance at their hated enemy.

I loved the response from ZackAttack on Webmaster World. "PS: Sorry I should have said.. IE may show it correctly but I imagine this is because of non-compliance "

The attack on the hated enemy has become almost a chore. (BTW, I need to say something bad about George Bush).
BTW, I am not a fan of Microsoft. Microsoft has a history of introducing new proprietary features with their browsers, and other moves to undermine competition. I am not a fan of Microsoft, but a rational world shout down Microsoft when it is in the wrong, but welcome when the company implements a more intuitive understanding of the standards.

We should be upset for the things that people do wrong. This modern method of trying to focus absolute hatred on one's enemy leads to naught.


Anyway, I know it is logically absurd. But the more I think about it. I would rather be floating next to that tanned young lady sipping a martini while floating in a pool that is in a boat floating in the ocean. She really needs just a little more sunscreen on her shoulders. My margarita would have one of those little umbrellas to keep the ice cube from melting. I know. I know. I would look absurd in a panama hat, bright floral patterned shirt and flip flops, but I can live with that.

Now, where is my lost shaker of salt?

2 comments:

Scott Hinrichs said...

I work with a couple of anti-Microsoft zealots who actively hate everything MS does, regardless of whether the particular action is for the better or for the worse. The point is to hate MS.

These guys are very smart, but their anti-MS agenda gets in the way of every project these guys work on. The savvy folks that have a say in what projects they work on flee anthing involving these guys.

y-intercept said...

This is one of the things that is killing our society. People are so tapped into defining and hating an enemy that they end up doing harm to the people around them.

In politics, it is likely that the Bush clan was so caught up with Saddam that they failed to assess all the risks of the world and failed to see the extent to which invading Iraq would alienate the US.

Today, many people are so caught up in hatred of Bush that they are likely to harm the people around them simply to express their hatred.

In the Middle East, people are so caught up in hatred of the US that they are willing to support people who kill their friends and neighbors!

The method where you define an enemy and let the hatred of the enemy dictate your actions leads to ruin. It ruins both yourself and the people around you.

Back to the subject at hand. The really nasty thing about the anti-Microsoft zealots is that they start treating those people who do not share their hatred with contempt. They often end up making extremely costly mistakes that other people must cover.