jQuery and Cufon Don't Mix!
IE7+8 Bugs with VML break Sizzle

IE7+8 Bugs with VML break Sizzle

Strange bed fellows or browser coup?
I got my team together this afternoon to give the newly approved Opera Mini for iPhone/iPod touch/iPad a try. Overall we agree it's great to see another browser in this space but they've got an uphill battle if they ever hope to overtake mobile Safari. Check out the rundown of our thoughts after the jump!
Read more →Leaner CSS with LESS

Do I win the prize for longest title?
Finally, a pure CSS solution!

Centering a div horizontally and vertically has always been a pain for CSS. Not any more! With this trick, you can create a centered block in no time.
Read more →See what's new in the latest build...

Actions without JavaScript!
A concept of how to define actions using classes. Best part is, there's no need to know JavaScript!
Read more →jQuery to the rescue!
Internet Explorer 6 is just too old to support all the fun CSS tricks of the modern web. The Input Type selector is one of the most problematic. I suggest a quick jQuery function to get around this.
Read more →An API reference does a method's body good...


In the process of trying to figure out what in the world was wrong with my stylesheet, I went to W3 to validate it (and, although it is irrelevant to this post, I found my problem in a typo. Isn't it always a typo?) Since I am lazy about these kinds of things, I did the validation by direct input rather than finding and uploading the actual file, and something entirely odd happened: the URL bar contained something that looked like a solid black mess. After one forced shutdown due to being worried that something had gone wrong, I copied and pasted the content of the bar into a text document and lo and behold! It was the URL (a 34 000 word one, no less, due to the direct-input validation's method of incorporating all the CSS into the URL) and because of its length, it had wrapped over itself.
Read more →It's been quiet on the SiteCrafting blog lately, mostly because we've been very busy making websites for out great clients. I've been swamped for the last two weeks with one project, and I know Kevin, Ken, Reena, and... well, everyone has a full load.
My latest few projects have all been sites that have a defined content width, say 850px, but centered in the browser window. The usual way to accomplish centering with CSS is to make the margins of the content to automatically adjust to the window (margin: 0 auto;). Usually, that happens on the specific areas, so if you have three content areas to center, you either need a container for all of those areas, or set margins three times. The first option has problems with backgrounds, and the second results in more code than is needed.
Read more →More form, less space
Some really large forms can be a bit of an eyesore especially to the people filling them out. One thing that always bothered me was how bulbous most textareas had to be just to make enough room for a user to feel they could type what they needed. So I set out to figure a good way to clean up my forms a bit while still allowing the multi-line input of textareas.
Read more →Making the timer look better
Last time, I outlined a way to create a simple PHP script timer. I use this timer in many of the projects that I work on, and it's really helpful to nail down trouble spots in scripts. The thing that it lacks, however, is a decent display. When you call the elapsed() function, it only gives you a number. Creating a decent display for each timer call is tedious and boring. So I simplified it. Now, I'm going to extend the existing Timer class and add some new functionality - make it look better and make it easier to call and display the information.

One thing that we frequently build in conjunction with new websites is a tool for sending out email newsletters. For the most part, we stick to XHTML/CSS and try to stay away from using "old" layout techniques (i.e. tables) for the newsletters. This allows the greatest flexibility between the large number of email clients (e.g. Outlook, AOL, Yahoo!, Eudora, Thunderbird, Pine, etc.). Businesses love being able to quickly communicate with their customers, and email newsletters are a great way to do this. But things are changing, and if you use HTML newsletters, you'll need to make some changes too.
Read more →Something no developer wants to see...
foreach ($left_elements AS $le) {
?>
<table class="leftnav_<?=$le['class']?>">
<tr>
<td class="leftnav_<?=$le['class']?>">
<a href="<?=$le['target']?>" class="<?=$le['theme']?>"><?=$le['name']?></a>
</td>
</tr>
</table>
<?
}if conditions.At least it's clean code!
