Posted
January 4th, 2009
in
Programming
/
Tags: CSS, Programming
Getting CSS rules to work across all browsers is a continuous fight. Thankfully, there are workarounds and DHTML methods to correct many of these problems, and if those fail, reluctantly there are hacks available. Unfortunately, it seems I’ve run into a difference of opinion between the browsers, most likely as a result of the W3 Consortium failing (yet again) to be explicit with their standards. The problem is the difference between the way Firefox and Opera interpret the “word-spacing” CSS property versus the way Safari and IE interpret the property. More specifically each browser treats the non-breaking space differently. FF/Opera both respect the non-breaking space and Safari/IE both ignore the space. For example, if the text is “first foo bar last”, FF/Opera would like:
first foo bar last
whereas in Safari/IE the text would appear like:
first foo bar last
Personally, I agree with the FF/Opera developers and feel that the non-breaking space should be respected since I’m explicitly telling the browser that words to either side of the non-breaking space should be treated as a unit. So now I’m going to have to put each phrase in some sort of HTML block and depend on a combination of padding and margins to accomplish the same effect in order for it to be cross-browser compatible.
Posted
December 14th, 2008
in
Linux
/
Tags: Apache, Linux, PHP
On Ubuntu 8.10, I ran into a bit of problem. The Apache web server was working fine, but the following commands:
sudo apt-get install php5 libapache-mod-php5
sudo /etc/init.d/apache2 restart
failed to work after creating a phpinfo.php file in the /var/www/ root folder. Firefox complained, “You have chosen to open phpinfo.php which is a: PHP file.” Apache was not using the PHP preprocessor for some reason. A bunch of forum posts and blogs said to edit either /etc/apache2/httpd.conf or /etc/apache2/apache2.conf in order to associate the PHP mime type with the file extension. That wouldn’t work because I had also installed phpmyadmin which has an apache.conf file that already has an AddType directive. So, after some digging around, it turns out the module wasn’t even being loaded, even though that’s what you’d expect the package manager to handle when you tell it to install the module. Any how, to fix the problem, just create symbolic links to the php5.load and php5.conf files in the /etc/apache2/mods-enabled/ folder.
sudo ln -s /etc/apache2/mods-available/php5.load /etc/apache2/mods-enabled/php5.load
sudo ln -s /etc/apache2/mods-available/php5.conf /etc/apache2/mods-enabled/php5.conf
sudo /etc/init.d/apache2 restart
Update: Debian-based installs of Apache2 have some handy command line utils for managing the web server. So to enable a mod, which automates the above, do this instead:
sudo a2enmod php5
a2dismod is the command for disabling a mod. For sites, there is also a2ensite and a2dissite.
As a few users of MyGoogleCal3 have already pointed out, the script no longer works properly. That’s the bad news. The good news is version 4 does work. In fact, with the latest changes Google made to their code, ALL the features that were broken in 3 appear to be working now—Agenda/Week view, the calendar navigation buttons, and IE is fixed. Please download and test out the latest version, and report any bugs in the comments and I’ll try to resolve them as time allows.
Read the rest of this entry »
Posted
November 7th, 2008
in
Personal
/
Tags: Blog, Personal
Some of the regular readers of this blog might have noticed that the design has changed. When I originally setup this blog, I of course chose one of the many ready-made themes available for WordPress. I settled on WP-Andreas01 and modified it for a two-column layout, swapped out the header image, and adjusted the colors. It was clean, it was light, and it was minimalist. Eventually I grew tired of it and wanted a dark theme, instead. I eventually settled on Never Ending Darkness which again was clean and minimalist. In the back of my mind, something bothered me even after I made the requisite changes to the layout, colors, and graphics. I finally determined that the design was cliché. So if I was to be happy with the design, it would have to be a design of my own making. This is a post-mortem analysis of that design.
Read the rest of this entry »