p { margin: 0; } p + p { margin-top: 1em; } This simple CSS trick will cause only the 2nd and following paragraphs to…
Expand / Collapse with jQuery – Part II
Since my first post on the subject, I was introduced to a jQuery method called nextUntil(). I didn't realize the possibilities with this method until…
IE Google Maps Operation Aborted
If you are one of the unlucky ones to receive an Operation Aborted message in Internet Explorer after attempting to embed a Google Map via…
Replace submit buttons with a spinner on click
This has the dual purpose of letting the user know that the website is "processing", while not allowing them to click the submit button twice.…
jQuery superscript register marks “on-the-fly”
The script below assumes that the content area of your site is wrapped in a div tag with an id of content. The first portion…
Two column list – the elegant way
If you have two individual lists, instead of stacking them, you'll be able reduce scrolling by placing them side-by-side. The example below demonstrates one elegant…
Remove indenting on UL and OL tags
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"…
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…