ol { margin: 0; padding: 0; list-style-position: inside; } By default, most browsers indent list elements from the left margin. The magic above is the…
Add content type icons to your links on the fly
Of course, there are simple and tedious ways to do this, such as: HTML <a href="test.pdf" class="pdf">Download PDF</a> CSS .pdf { background: url('/src/img/icon-pdf.png') no-repeat; padding-left:…
Eliminate page centering “jumps”
body { overflow-y: scroll; } How annoying is it when you link from a "short" page to a "long" page and the vertical scrollbar "jumps"…
Use jQuery to highlight the current navigation item
$('a').each(function() { if(document.URL.indexOf($(this).attr('href')) >= 0) $(this).addClass('selected'); }); Note: This code will add the 'selected' css class to all <a> tags which link to…
Registered (®) and Trade (™) marks / superscript line spacing
sup { position: relative; height: 0; bottom: 1ex; line-height: 1em; vertical-align: baseline; _vertical-align: bottom; /* ie6 hack */ } If you want to adjust…
Getting Free Incoming Links Tip: Coupon Codes
I've you've started to explore the world of Web Marketing/SEO, you've no doubt learned that one of the most important aspects of driving more traffic…
Normalizing a string (PHP)
We'll present one algorithm below which demonstrates the use of a loop and the ord function to step through the characters in a string. In…
jQuery Plugin – Portfolio Rotator
We've released a new jQuery plugin called jKickRotator. You might be saying, "okay, thanks, but there's a million jQuery rotator plugins". We couldn't agree more!…
Cross browser testing tip #1
Occasionally I find my self banging my head on the desk trying to make sure what seems to be a simple presentational element, looks identical…
Case Study: Flash vs. jQuery rotator
In this study, our goal was to compare the development time to create a very simple 3 slide rotator in jQuery vs. Adobe Flash. From…