Nixer: a CSS-only theme for Drupal
When I first setup Drupal on this site, I had pretty much decided that I would use an existing theme from Drupal's theme repository. And for a while, I did. I reviewed a lot of different themes, from very basic themes to more visually appealing ones. I eventually settled on one or two and gave it a go. This worked okay for a while but over time, I came to the realization that:
- themes can have bugs too (some serious)
- debugging other people's CSS and PHP is a lot of work
- heavy themes can really slow down your site
Using z-index to control layers in CSS
When arranging CSS block elements on a web page, the blocks will sometimes overlap whether it is intentional or not. When viewing the resulting page, these overlapping blocks may not be noticeable because the actual contents of the blocks do not overlap. In such a scenario, the designer may decide not to do anything further since the contents of these overlapping blocks display as desired.
CSS: Unaccounted for space underneath an image
Web designers, especially those who work with CSS and XHTML understand the importance of pixel-level control. Page layouts are often done with pixel precision. That's why when the page rendering deviates from the designer's expectations based on the written source code, it can be extremely frustrating.
Nesting multi-line comments in CSS
Multi-line comments in CSS follow the C style of commenting. The beginning of the block is indicated by a /* and the end of the block is indicated by */. For example, in the following block:
#header {
/* margin-top: 10px;
margin-bottom: 10px;*/
float: left;
clear: both;
}
Tips for managing your E-mail Inbox
Anyone who has ever used e-mail extensively understands the importance of managing e-mail. E-mail can be both a blessing and the ultimate curse. It can be a useful productivity tool or it can literally enslave you to the point where e-mail is the only thing you do. We've all been there. So then the question becomes, what is the best way to manage your e-mail?
Farhad Manjoo recently wrote an article for the New York Times attempting to address this question.
Securing Drupal admin pages with http authentication
You can add of layer of security to your Drupal installation by requiring http authentication to access Drupal's admin pages. This authentication would happen outside of drupal and as such, may be less susceptible to certain types of attacks. Certainly, if there is a security hole in Drupal that can be exploited without any interaction with the admin interface, this technique won't help at all. But it may act as a deterrent in some cases.
Tuning Apache's MaxClients setting
In apache 2, the MaxClients directive in your apache configuration will determine the maximum number of server processes allowed to start. As you probably guessed, it's a very important directive. If you reach the limit, you'll get a very friendly message in your apache error log saying:
[Thu Oct 18 06:22:19 2007] [error] server reached MaxClients setting, consider raising the MaxClients setting
Is Drupal slow and bloated?
I came across a couple of interesting articles today:
Script to change the file extension on multiple files
Sometimes it becomes necessary to change the file extension on multiple files. For example, you may be migrating a website and want to change all the extensions from .htm to .html. Or perhaps you have installed a php application like phpBB and want to use a different file extension from the default (.html instead of .php). This script can accomplish this for you in one quick step.
You can grab the script here:
Using CSS to prevent arbitrary line breaks at slashes (/)
In working with HTML, many of you have probably dealt with the issue of unsightly line breaks being inserted by the browser from word wrapping. Automatic word wrapping is usually quite predictable, happening when the browser meets whitespace or a hyphen. You can use special characters to control whether the wrap happens or not, e.g. a non-breaking space ( ) or a non-breaking hyphen (‑). But did you know that word wrap also happens at slash (/) characters?
For example, take a look at the following line:
Recent comments
10 sec ago
42 sec ago
1 min 13 sec ago
2 min 5 sec ago
2 min 32 sec ago
2 min 57 sec ago
11 min 57 sec ago
12 min 35 sec ago
13 min 3 sec ago
13 min 28 sec ago