Articles
Form Submission Opens New Tab/Window
You probably knew that you could force a link into opening a new tab or window with the target=”_blank” attribute (deprecated, but universally still supported).
<a href="#" target="_blank">link</a>
But you can use the same exact attribute on forms to get …
Error-Free Console Logging
var Fb = {}; //An empty object literal for holding the function
Fb.log = function(obj, consoleMethod) {
if (window.console && window.console.firebug && window.console.firebug.replace(/^\s\s*/, '').replace(/\s\s*$/, '') !== '') {
if (typeof consoleMethod === "string" && typeof console[consoleMethod] === "function") {
console[consoleMethod](obj);
… Remove Private/Protected from Post Titles
For the functions.php file in your theme:
function the_title_trim($title) {
$title = attribute_escape($title);
$findthese = array(
'#Protected:#',
'#Private:#'
);
$replacewith = array(
'', // What to replace "Protected:" with
'' // What to replace "Private:" with
);
$title = preg_replace($findthese,
… Free Template: DocTemplate
Remove Margins for First/Last Elements
It can sometimes be desirable to remove the top or left margin from the first element in a container. Likewise, the right or bottom margin from the last element in a container. You can do this by manually applying classes …
Make All Links Feel Subtly More Button-Like
On this current design of CSS-Tricks, you may have noticed how all links bump themselves down one pixel as you click them. I started noticing this effect on sites of luminaries like Tim Van Damme and Andy Clarke, so …
Thank You (2009 Edition)
Before January slips away from me, I want to get my annual Thank You post out! Thanks to TheDoc (our resident prolific forums guru) for reminding me.…
Temporary Maintenance using Mod_Rewrite
# Don't forget to turn on the rewrite engine
RewriteEngine on
# Maintenance Redirection
# Replace 555\.555\.555\.555 with your own IP address
# Uncomment first conditional to turn off the redirection
# RewriteCond %{REQUEST_URI} ^$a
RewriteCond %{REQUEST_URI} !maintenance.html
RewriteCond %{REQUEST_FILENAME}
… Designers These Days…
… have a good design sense and understand the fundamentals / design principals.
… know all the major design software including the entire Adobe Creative Suite.
… have some basic video editing skills.
… know HTML, CSS, and JavaScript.
… …
If it’s not one thing, it’s another.
This year on 24 Ways, Jeffrey Zeldman wrote an article about the rending problems of “real fonts” on the web. The one line summary: different browsers and different platforms do “hinting” differently which can be bad news. Of course, …