If you would like to comment on this post, please email me at edward.bilodeau@gmail.com.

© 1998-2009 Edward Bilodeau

Disclaimer: The opinions expressed here on this site are my own and do not represent those of my employer in any way.

« Previous Post | Up | Next Post »

Paying for lazy coding practices

I've made a small change to the layout of this site, doing away with the inline titles for posts.

The problem was that these titles were not the actual titles from the database, but rather duplicate text that was simply bolded. I can't remember why I started doing this: probably didn't have time to code it properly. Whatever the case, I'm paying for it now, since I now have extraneous text at the beginning of each post.

The result was that I had duplicate titles for each post. My temporary solution for this is to use the first-child pseudo-class to select the first bold/strong element in the entry and hide it. If you dig through the archives you'll see that this mostly works, except for the fact that I typically placed a space and a period outside the 'title'. These now appear at the beginning of most of my posts, and will stay there until I get around to manually cleaning them out of all my posts.

Also, since first-child isn't supported in IE <=6, the double-title problem will persist for anyone still using those browsers. An acceptble tradeoff for my personal site, but not something I would try at work.