Archives for “howto”

How to Change the Content-Type Meta Tag in Drupal

I’m working on an HTML5 theme for Drupal 7 right now, and I needed to change the meta content-type tag. By default it looks like this: <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />, and I needed the updated HTML5 version: <meta charset="utf-8" />. Normally, you can replace these things in one of the theme template files, but [...]





jQuery Popup Footnotes

A recent site I worked on had footnote references throughout the body copy, and a corresponding list of footnotes at the bottom of the page. That’s easy enough to mark up, but the client also wanted the footnote to display it a little tooltip-style popup when you moused over the footnote reference. I didn’t want [...]


How to Hire a Front-End Web Developer

The following is an email exchange I had with a friend at another company about a year ago. We were talking about the best way to go about hiring a front-end developer, and I was sharing some tips from our hiring process. “Hi Scott, we are in need of a CSS expert/ninja. Our company has [...]



How to Convert Your Old WordPress Database to UTF8

When I upgraded my WordPress installation recently, I ran into a chracter encoding problem. Long story short, it turns out that older WordPress installations like mine tend to have been created in latin1, but the data is actually being saved in UTF8. If you update your wp-config file to a newer version, it adds a [...]


How to Avoid Paragraph Gaps when Using Superscript and Subscript

Frequently, when I see a webpage with superscript or subscript text, I see associated gaps in the paragraph. This is caused because the default way browsers render super and subscript text is to add enough vertical space in the paragraph to show them. The result is ugly, but as you can see in the following [...]



How to Get Your Most Recent Twitter Posts Using PHP with Caching

When we started redesigning the Pop Art blog, one of the chief requirements was to integrate everyone’s Twitter feeds into the site. In addition to the Pop Art Twitter feed in the sidebar, we wanted to add individual twitter feeds on the profile pages. The problem is that the javascript code that Twitter provides can [...]




How to Search for This and Not That Using TextWrangler

I’ve been doing a ton of search-and-replace operations at my job lately, and one of the worst ones I did had to do with searching for the word “Comfort.” Unfortunately, this word is absurdly common on this site, and I was getting well over 1000 matches, most of which didn’t apply. Now, the first thing [...]