Persistant Headers on Tables
When you scroll down a page with a long table on it, typically the header of the table scrolls away and becomes useless. This code clones the table header and applies it at the top of the page once you …
When you scroll down a page with a long table on it, typically the header of the table scrolls away and becomes useless. This code clones the table header and applies it at the top of the page once you …
Used in casting shadows off block-level elements (like divs).
.shadow {
box-shadow: 3px 3px 5px 6px #ccc;
}
You know you should use JavaScript when the task cannot be accomplished with any other technology.
That’s what Doug suggested when I asked him for a nicer spin on a something that was going through my head:…
Browsers already have “back” buttons, so you’d better have a darn good reason for needing to put one on your page!
<input type="button" value="Go Back From Whence You Came!" onclick="history.back(-1)" />
This is totally obtrusive, …
Valid technique, as it doesn’t need the <embed> tag.
<object type="video/x-ms-wmv"
data="movie.wmv"
width="320" height="260">
<param name="src"
value="movie.wmv" />
<param name="autostart" value="true" />
<param name="controller" value="true" />
</object>
… Quicktime still requires the double-object method to get it done across all browsers. Not super pretty, but it does get the job done.
<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"
codebase="http://www.apple.com/qtactivex/qtplugin.cab"
width="200" height="16">
<param name="src" value="movie.mov" />
<param name="autoplay" value="true" />
<param name="pluginspage" value="http://www.apple.com/quicktime/download/" />
… Funny email from a reader, that I figured would make a good post:
…This is a funny redirect. I get one or two visits a day from teenage gangsters trying to enter my server by checking if a wp-config-file exists
It can be considered a security risk to make your wordpress version visible and public you should hide it.
remove_action('wp_head', 'wp_generator');
… This is a way to make a single error page for all errors, which is easier to update and maintain.
ErrorDocument 400 /error.php
ErrorDocument 401 /error.php
ErrorDocument 403
… $("p").live("click", function(){
$(this).css("color", "red");
});
The reason this is smarter is because there are likely many p elements on the page. If there were, say, 10 of them, traditional click event binding would require 10 handlers. The live function only …