Category Archives: Web Standards

HTML, CSS, accessibility, and the open standards that make the web work.

More on the Gnome Regression

Another newsletter, another reason to worry. Here’s the quote:

We’ve spent a lot of time and effort on our cutting edge CSS layouts and, while they are definitely fancy-schmancy, they detract quite a bit from our core efforts which are great content and easy access to it. So, as Chris put it in yesterday’s Windows Fanatics, we’re taking a mulligan and calling a do over. Lockergnome is changing looks one more time and moving to a more traditional layout and coding structure. This, my friends, successfully filled the rest of the time between when we last graced your in-box and now. I’ve been locked in my office, nose to the grindstone, hacking out automated content updaters, link rotators, and convoluted include structures hand over fist. Now here’s the part that’s going to get resident Web-Gnome, Foofy Mathews, on a plane to throttle me in my sleep… All the layout is based on tried and true HTML tables.

Dave and Paul have already added great thoughts to the discussion, so I’m not going to address the “tried and true” web techniques of the mid-nineties again. My previous optimism is waning, and I hope someone at Lockergnome is listening and will come out of the echo chamber and let us know what’s going on.

Update: I’ve written an update that explains why I care.

Back In Town

The ride back from Austin earlier tonight was a delight. The stars were gorgeous, I felt like the only person on the road, and the music was excellent. The trip was enjoyable and a much-needed break. On Saturday I also had the pleasure of having lunch with Jacques Distler. His links may be terribly crufty but his markup is impeccable and most importantly he’s a swell guy. Before I knew what happened we had already talked almost two hours, and the conversation could have continued for many more. If two bloggers meet and no one takes a picture it didn’t happen, so I took the oppurtunity to try out the new phone camera and snapped this:

Jacques Distler

Enjoy it, I paid 25 cents to send that to myself. I need a bluetooth dongle.

We discussed, amoung many things, comment spam and crap-flooding. The conversation foreshadowed the next morning when I was drizzled (“flooded” doesn’t seem appropriate) by a few hundred trackbacks. More on that later though. For now I have decided trackback is a security vulnerability disguised as a poorly-implemented cross-blog communication tool perpetuated only by a MT software monoculture. Trackback is dead, long live pingback.

Nick Denton: Blog Maven / Thief

Every once in a while someone you hear a story that makes your blood boil. Sometimes it happens to someone you know. Joe Clark has the complete details, but here’s a rundown of the events as I understand them:

  1. Noel Jackson redesigns Fleshbot using CSS and XHTML, all in perfectly compliant code. I talked with him for a bit of this, sent some screenshots. He worked really hard on it and the result was, if I may say so, gorgeous despite the questionable content.
  2. Joe contacts Nick Denton on behalf of Noel saying what a neat thing Noel had done and recommending they hire him. Joe can be a nice guy like that.
  3. Denton responds that they can’t really afford anything like that right now.
  4. Noel’s design shows up on Fleshbot, a few days later they remembered to credit him for it.
  5. Later Noel’s exact code, right down to an empty div he had to add to get the layout to work just right, shows up on Gawker and Gizmodo. Some colors are changed, and likely due to incompetence of the implementor the other new designs have numerous mistakes added.
  6. Noel steams quietly for a few days, then talks to Nick Denton. Denton doesn’t see what the big deal was using Noel’s copyrighted work on several other sites. It reminds me of people who rip off other’s designs and then don’t understand why you’re mad about it. The copies are not as high quality as the original, as well.

Smells rotten to me. Personally I was quite fond of Gizmodo, as it really is a high quality blog, but I’m not going to visit it anymore and I’ve delinked it because I don’t want to support a company with such low ethical standards. I encourage you to consider the situation and come to your own conclusions. All I can do at this point to support Noel at this point is let more people know about what’s happened to him, in the hope that possibly this could end on a more positive note.

Update: Denton has emailed me and is telling everyone that he has posted chat transcripts that clear everything up. I applaud him for putting more information out there, but it doesn’t seem to help his case much. I suppose anyone can claim ignorance as the reason for a mistake. Some will believe that, some won’t. What makes the difference is actions from here on out, now that everything is “clear.”

Distributed Social Networking Software

One of the greatest things about South by Southwest interactive last year, which I just barely made it to, was the incredible creative energy born of like-minded people interacting with each other closely. Out of a conversation with Tantek Çelik regarding linking, social interaction, and leveraging HTML rather fabricating new formats I became involved in what now is known as XFN, or the XHTML Friends Network.

XFN is a standardized method for leveraging the HTML rel attribute to describe relationships between people. More simply, it’s about enhancing how you link to somebody. Together with Tantek and Eric Meyer (and wonderful feedback) we’ve put together some great information and guidelines for using XFN. Check it out and share the link.

As an example of an early XFN application, people who I’ve met in person now automatically have a star beside their name when I link to them. See the “timely dozen” to your right or my portal page.

A Cite To See

If you notice this sort of thing, the last post and one several days ago about Charles Platt now have visible attribution as part of the inset quote, which is marked up using the HTML <blockquote element. Each of these block quotes has a cite attribute, which is invisible to the user but which I sometimes add when I feel like having million dollar markup. Honestly I had slacked off doing lately because I wonder: if you add an attribute to an element, and no one sees or uses it, does it make a sound? It does now.

Thanks to an ingenious script from Dunstan which he describes in this post my cite attributes are now clear for the world to see. Can you hear me now?

The validationists in the audience will notice that am I not using the cite attribute in the strict sense because the value “Albert Einstein” it isn’t a URI. They would be right: it is technically in violation of the spec. However it is correct in spirit if not implementation. The URI RFC says “Not all resources are network ‘retrievable’; e.g., human beings” and “An identifier is an object that can act as a reference to something that has identity.” We’ve got the “resource” and “identifier” part down, what about “universal”? To be fully in line with specification what we need is a protocol to indicate individual people. I propose something like the following:

person://Albert Einstein

Thoughts? Now I just need to work up the javascript chops to hack around with the script, or if I’m lucky Dunstan will get an itch and beat me to it. The cite attribute checking should probably allow for protocols such as ftp:// and irc:// as well, not just http://.

Design SIG Meeting Tonight

I just wanted to let everyone know I’m going to be presenting tonight at the web design special interest group at HAL-PC. I’m going to be covering advanced CSS layout techniques, why CSS is easier for making sites, Topstyle 3, and we’re going to do a brief makeover of someone’s site at the meeting. I’ll be going through my personal methodology in making a standards-based website and redesigning legacy sites. If you have been struggling in trying to move away from table-based design or if you’d just like a free critique of your website, come out. The meeting is free and open to everybody.

Here are the details:

When? Tonight, September 18th, 7:00 PM.
Where? HAL-PC Headquarters, 4543 Post Oak Place Drive, Suite 200 Houston, TX 77027-3103.
Why? To learn and have fun.
How do I get there? Use the map linked above. Easy directions: Take 610 and exit San Felipe, head inside the loop (East) and then take a left at the first intersection. You will come to a stop sign, then pass Microcenter, and then at the second stop sign take a right. Go on that street until it dead ends in a loop, on the right end of the loop there’ll be a driveway going to an underground garage. Park, take the elevator to the second floor, and then the only office there is the HAL-PC offices. Once you’re in the office if you have any trouble finding the room we’ll be in just ask any of the friendly volunteers and they’ll point you in the right direction.

If you have any questions just drop me an email before the meeting and I’ll send you any additional information you might need.

Structure Updates

Just to update on some of the latest changes going on around here as part of the redesign.

The biggest changes have come as part of the new “photos” section. In moving the photolog from /p/ which I consider (in hindsight) to not be the best URI I thought about what sort of photographic content I have on the site now and what I’d like to have in the future. In my mind three sections came to mind, the photolog, selected series of works, and old photos. I’ve experimented with putting older photos into the photolog but it doesn’t really work well with the reverse chronological organization of the albums. Plus as part of my moving I’ve dug up a ton of old pictures that I’d love to scan and archive online. The series idea never really developed beyond the first two I did (and it’s built on the structure of the photolog) but I really like the idea of it and I’d like to keep it around. For instance it’d be interesting to do a “Best of 2003” series at the end of the year, or something similar. (Though the thought of choosing a dozen or two from over 7,000 photos is a little intimidating.)

The re-coding of the photolog itself is actually going much better than I thought it would. Finding things in Gallery can be frustrating sometimes, but I’ve managed to get the vast majority of the program completely free of tables, simple syntax errors, and it’s now using a CSS-based design. I am using one hack to get XHTML 1.1 validation, but it’s because of a bug in PHP that I will devote an entire post to. As soon as I finish cleaning everything up for the photolog section I’m going to copy the code over and use it to power the classic photos section.

I’ve been recoding many of the titles of pages to use the new CSS image text method, and I enjoy the results. When I recently upgraded to PHP 4.3.3 something changed in the Freetype library and now the letters are rendering at what seems to be a lower weight, which is a pleasant surprise because they were a little chunky before. I have no idea why it would do this. Unless perhaps a newer version of Freetype could better understand the font file, which I suppose is the only explanation.

I changed the text image generator script to turn underscores to spaces instead of hyphens. Though I like hypenated “filenames” better the problem came in the photolog where there were actual hypens needed in the titles, so having those translated to spaces was a little funky.

Finally I’ve done a little work on the jazz quotes section of the site. Although I have been neglecting it lately, these pages account for a good fifth of the traffic to this site and it’s really the only resource of its kind on the net. For some reason before I would seperate the first and last name in the URI with a period, which messed up some simplistic traffic analysis software (what sort of extension is .Coltrane?) but it’s what I chose for whatever reason. I’ve updated all the new URIs to use hypens instead of periods, which is much cleaner in my opinion. There are so many links to these pages and so much search engine traffic that it would just be stupid to break any of the links. Of course the old URIs still work, though I haven’t set them up to serve a permanent redirect yet, they just return the page like before. This section still needs a lot more work, in its styling and also just in the backlog of submitted quotes I have to catch up with.

The Zeitgeist has been updated to no longer return script errors, but it isn’t cached so it’s very slow, and it needs to be restructured.

Whip Gallery Into Shape

For too long this site has been beautiful XHTML 1.1 served with the correct DOCTYPE and MIME type save for one section. One major section, with thousands of pages. The photolog. Part of it has been that Gallery is so inflexible I have to make extensive modifications just to get it to look like the rest of the site. The logic and presentation is all a mess in the code, and it’s quite invalid out of the box. Well, version 1.4 has just been released, and I can live with that until 2 comes out, so I’m going to use 1.4 as my baseline and get it 100% valid to the point I can serve the pages with application/xhtml+xml without fear of the pages not working. Wish me luck. The photolog may look quite funny during the process, but give it time and it should be back to its rosy and frequently updated self.

Books to Live By

Jeffrey is in good company:

In the early stages of moving I could only take a handful of books so I chose the ones that I knew I would need for my classes, the ones that I referred to often, and the ones that mean the most to me. The books, from left to right:

  • On Writing Well, William Zinsser
  • The Journey of the Mind to God, Bonaventure
  • MLA Handbook
  • Philosophy of Language, William Lycan
  • Autobiography of Red, Anne Carson
  • Fear and Trembling, Soren Kierkegaard
  • Selected Poems, William Wordsworth
  • The Republic, Plato
  • Designing with Web Standards, Jeffrey Zeldman
  • History of the Peloponnesian War, Thucydides
  • The Federalist
  • The Prince, Niccolo Machiavelli
  • Four Plays, Aristophanes
  • Bowling Alone, Robert Putnam
  • The Anti-Federalist Papers and the Constitutional Convention Debates
  • Utilitarianism, J. S. Mill
  • The Diamond Age, Neal Stephenson

Stylish Thumbs and Navigation

On the last post I had decided to do something I do occasionally, embed some thumbnails from the photolog in a relevant post. While I was writing the post I thought to myself, “Man this thumbnails are going to look funky, I should center them with <p align="center">.”

Blasphemy! I know. Forgive me, I was tired. Still, align="center"? That is so last decade. So I decided to give the paragraph a little class, postthumbs, which to me describes the content of the paragraph and is something I could see myself reusing. What follows is trying to add a little style to some simple thumbnails.

I’m a fan of the double border look for thumbnails, a thick white border surrounded by a very thin darker border. You see it done all the time, for example Rannie and Christine, but in both cases the border is actually part of the image itself.

This is cumbersome for several reasons. First, this may be geeky of me, but it seems like it’s violating the principle of separating content (the thumbnail or picture) and the presentation (the border). In addition this technique is rather inflexible. If Rannie decided tomorrow that he wanted orange and green borders instead of the white and black ones he has now he would have to regenerate every single thumbnail. Since I suspect both Christine and Rannie do this effect in Photoshop, this is a pain however you cut it, even with heavy batch action.

So the solution is CSS. If you remember the box model you’ll see that this effect should be rather easy. We can just put a background on the element and it will show through on the padding, then the border goes outside that, creating the effect of a double border.

How I do these sort of things is I create an HTML file on my desktop with the generated code from whatever page I’m working on and then I use it as the preview in the excellent TopStyle 3.1 so I can see whatever changes I’m making to the design live. In my opinion this is the only way to design with CSS. The only downside is right now I can only preview things in Internet Explorer because the Mozilla object it calls doesn’t seem to work quite right with 1.5 betas. However for most projects getting it working in IE first is the most realistic thing to do.

So let’s take a look at the code we’re going to be styling:

<p class="postthumbs"><a href="/p/9-9-2003/DSC06440"><img src="/a/9-9-2003/DSC06440.thumb.jpg" alt="The front of my new business card." /></a> <a href="/p/9-9-2003/DSC06439"><img src="/a/9-9-2003/DSC06439.thumb.jpg" alt="The back of my new business card" /></a></p>

So my first inclination was to apply the background and border to the anchors (the <a> element). After playing with the colors for a bit here’s what I ended up with:

.postthumbs {
  background: #eef5c5;
  border: 1px solid #e7f3a5;
  border-left: none;
  border-right: none;
  text-align: center;
}
.postthumbs img {
  padding: 6px;
}
.postthumbs a {
  background: #fff;
  border: 1px solid #cde44e;
}
.postthumbs a:hover {
  border: 1px solid #8a9f18;
}

It did exactly what I was looking for in the preview, and it allowed plenty of flexibility and did exactly what I wanted to do. Let’s talk a little about what the above code does. The first class is for styling the entire paragraph, which fills up all the horizontal space available to it. The first rule gives the whole thing a background, the second rule puts a one pixel solid border on all sides, and then the third and forth rules remove the border from the left and right side. Finally we say to center everything. Occasionally I’m asked why I apply the border to all sides and then remove it instead of just having simply border-top and border-bottom rules. The simple answer is then whenever I changed the color or thickness or style of the border I would have to change it in two places, and this way I only have to change it in one place. I think it’s roughly the same number of characters too.

The second selector says that any images inside of anything with a class of “postthumbs” should have 6 pixels of space around it. Then the next two apply the white background and a border that changes when you hover over the anchor.

We’re done, right? Not quite. As soon as I loaded it up in Mozilla I noticed that the white background and border were, for lack of a better term, bunched up at the bottom. I suspect that for some reason that where Internet Explorer put the anchor “box” around the entire image Mozilla just put the box around what looked like where it would be if there was text there, so the font size (12 pixels) plus the line height. Generally in cases like this I assume Mozilla is right and IE is just being overly forgiving, so I find a workaround. I’d like to find the exact reason for this behaviour, but I don’t have a lot of time right now and the Mozilla Bugzilla interface is so painful.

So the previous method looks funky in Mozilla, but a solution quickly came to mind. If I put the padding, border, and all on the image then that should avoid all problems. I could even keep the hover psuedo-class on the image even though IE users wouldn’t see the effect. Here’s the final code:

.postthumbs {
  background: #eef5c5;
  border: 1px solid #e7f3a5;
  border-left: none;
  border-right: none;
  text-align: center;
}
.postthumbs img {
  background: #fff;
  border: 1px solid #cde44e;
  padding: 6px;
}
.postthumbs img:hover {
  border: 1px solid #8a9f18;
}

As you can see this is a bit less verbose and generally simpler to understand. What we have is a consistent look in IE and Mozilla and enhanced functionality in more technologically advanced browsers, which is something I’m perfectly comfortable with.

In other news the links on the page are no longer bruised blue and purple, but rather some shades that I think match better. I’m a big fan of :visited link states as it can be very useful when browsing and is also interesting to see links you’ve already visited on other sites. I usually make visited links a little darker, which seems to delineate them clearly. Another common technique I’ve seen before is to not have visited links underlined, which I think is also nifty. However sometimes I see :visited states on site navigation, where it is nearly useless.

Navigation has started to flesh itself out, but it still has a long way to go. I’m going to have to reevaluate the site’s information architecture and reassess what sections could be combined and which need to be retired. There is also the question of what to do with all the contemporaria I kept in my sidebar before, and I’m not quite sure yet. I think maybe a nested sidebar that you can turn on but is off by default. I’m using these changes to give Dreamweaver MX 2004 a solid run-through and so far I’ve been very satisfied. It’s nothing revolutionary, and many of the new features they’ve been pushing don’t really appeal to me, but it has the polish of a mature product that I feel comfortable spending a lot of time in. I would have called it 6.5, but then again over at WordPress we put major functionality upgrades and changes in to hundredth point upgrades.

Bye-Bye Google Ads

The Google ads are gone on this site for the forseeable future. I did it mainly as an experiment, firstly in doing some server-side hacking on the javascript, which was later negated by them offering color choices, and secondly to see how they would do. The response was good, but the ads never seemed really relevant to my content, they slowed down page loading, and they wrote semi-invalid markup to the browser, which is violating standards but through javascript so the validator couldn’t see it. I am tempted to leave them up until I hit the $100 mark and get a check (I’m about halfway there now) but the response has been waning as I suppose my audience has gotten used to them and/or the relevancy of the ads has decreased. All of that, and I’d much rather put the Photo Matt endorsement on items I have personally reviewed and recommend, such as the two books that have returned to their place at the top of my page.

What I’ve decided to do is when I get a new CD or electronic toy that really strikes my fancy, I’ll make a small banner for it and put it at the top there. That way you get home-made “ads” of things I use myself and enjoy. This seems like a much more personal approach, and one that seems better suited to a personal site such as my own.

Refresh

I love when it rains because I feel like it soothes my soul.

Last night in the space between conciousness and sleep I wrote an entry. It was beautiful, exquisitely thought out and relevant, and I even imagined the markup I would use. My last thought before I drifted off was I should write something down before I forget it in the morning. I forgot it, and I’ve been trying to toggle my memory since then.

I was trying to toggle my memory while driving this morning. However when I drive I don’t think, I just listen. I couldn’t find the two CDs I had planned for the drive but an older album did the job nicely. When I listen to music the bass vibrates all of the mirrors in the car when it hits. Depending on what pants I’m wearing, it sometimes vibrates my pants as well, making me think that my phone is ringing, but not any more because my phone no longer vibrates. Watching the rearview mirror when it vibrates is fascinating, as a picture of the world behind you goes from near-perfect clarity to fuzziness as the music plays. If I even make a movie, the first shot will be of a rearview mirror vibrating with the music.

A replaced faceplate apparently crippled my phone’s ability to vibrate. Now it is a beautiful, vibrant blue. Can I have my blue and vibrate too? We shall see. Maybe it’s just time for new phone.

New Accesibility Forums

Everyone’s favorite Ian, who is at a new URL and finally blogging again, and friends hvae put together a sister forum to his excellent Accessify resource. The new Accessify Forums look like they could develop into a great resource and I’ve already registered. I might even post as soon as things calm down a bit here. I’m keeping very busy with four different kinds of work and most recently installing the new Gentoo. I’m considering setting up a semi-private Portage server for Houston friends. Would anyone else be interested in this?

Prettify Project Gutenberg Books

I’m dead tired, but before I go to sleep I wanted to inform you of a neat tool you might dig. Month before last at the Houston Palm Users Group (which I lead) we did a bit on creating ebooks. I covered the Palm Markup Language which is a sorry excuse for a markup language. To balance out how bad PML was, I wrote a little tool that would convert Project Gutenberg texts to a format more sutable for ebook reading. See the problem with the Gutenberg texts is that they are plain ASCII files which wrap every 76 characters or so. What this means on a PalmOS device is that you get a line and a half of text, and then a break, and it makes reading anything a major pain.

So what HPUG DocIt! does is combine paragraphs of text into one line so you don’t get funny line breaks everywhere, except where you want them between paragraphs. It’s pretty basic, but I’ve found it incredibly useful and a number of members of the group have as well. Even though the only other time it’s been mentioned was at the meeting and on the HPUG website, it converts about a dozen documents every day. Anyway I’d just like to put this out there as a service. The interface should look pretty familar to Texturize users, with the additional option of being able to upload text files. If there is interest there is definitely a lot of room for improvement in this tool, for example it could convert the ASCII faux text styling (stars for bold, underscores for underlined, etc.) to HTML equivilents, and it could also determine when the nend of a line is a hyphenated word and deal with the break accordingly. But for now, it does one thing and it does it well. Enjoy.

I Spy CSS

The inimitable Joe Clark’s Ten Years Ago in Spy has a brand-spanking new all-CSS layout from yours truly. As Joe said, “Take that, Alex Isley, Christiaan Kuypers, and B.W. Honeycutt!”

I didn’t do a strict before and after comparison, but I estimate at least several K have been saved. The biggest savings should come from the table, which had an elaborate system of classes that I was able to all but eliminate thanks to the flexbility provided by Joe’s semantic markup. Enjoy, and take some time to browse the archives, it’s quite entertaining.

Mozilla 1.4

THANK YOU Mozilla 1.4 for deleting all of my bookmarks. This could take months to recover from. I must have a copy somewhere…

Otherwise things are good on my front, the rhyming email project has been going well.

Update: I found the bookmarks.html file and was able to import it successfully. Whew!