No More CSS Hacks: PHP Browser Detection

You can’t make your page render correctly in every browser. It just isn’t possible. Between several versions of the bug-ridden Internet Explorer (why can’t Microsoft just switch to Gecko or WebKit?) and a sprinkling of older browsers, there are too many bases to cover. Internet Explorers 6 and prior are notorious for their bad CSS implementations (IE7 is better, but it still has a ways to go), and if you tweak your CSS to look right in them, chances are you’ll create another problem somewhere else. When does the endless cycle of fixing things end? When you give up and say “it’s just not going to work in all browsers.” Now, you don’t want to give up too soon, since there are still a lot of people on IE6, but you have to know when to call it quits.

And don’t forget about mobile browsers. Sure, their improving, like Apple’s mobile Safari browser on the iPhone, but it’s still a lot easier to use a mobile-specific version of a site than zooming and scrolling around on the tiny screen.

As usual, PHP has a solution. That solution comes in the form of the global variable $_SERVER['HTTP_USER_AGENT']. It holds a string that contains a bit of information about the browser and platform a user us using. By searching through the string, you can figure out what browser your users are browsing with, and write-in the right code depending on the browser. You can do this in as simple, or as complicated, of a way as you want.

Continue reading →

Web 2.0 How-To Design Style Guide

Web Design From Scratch has a great article that I’ve read a few times in the past, and recommend for anyone who does more than just edit prefab templates for their website. If you make actual designs from scratch (I’m not sure if that…

Poll: What’s Your Take on Twitter?

Twitter… It seems that either you really like the service, or you totally refuse to use it. I fell into the latter category, until a few months ago, when I looked at it closer, and read some posts by some bloggers I read. A…

PR 6!

I just found out that WSC’s PageRank is up to six now. Cool. I hadn’t checked it in a month or two, since I’m not obsessed about PageRank like some bloggers.

jQuery LavaLamp Menu

jQuery, being one of the most popular JavaScript frameworks on the planet, gets a lot of cool scripts developed for it. LavaLamp is one of those jQuery-dependent scripts that’s useful, and really cool at the same time. LavaLamp, adding only 700 bytes to your…

BlogBuzz May 24, 2008

Widgetized WordPress Admin Dashboard

In WP 2.5 the WordPress developers tweaked the WP dashboard, making it a bit more usable, looking sort of like Netvibes or iGoogle. Unfortunately, they haven’t seen fit to provide the ability to customize the dashboard “widgets” yet. So what’s the point? Well, it…

Design (And More) Spotlight: Webmonkey 2.0

Webmonkey, around sine 1996, is one of the most well-known and long-running web development sites. Their blog was one of the first blogs I read, and the first one that I subscribed to via RSS. Some changes have been happening lately over at Webmonkey.…

Fixed vs. Liquid Layouts

This is yet another web-related topic that gets people arguing. Not quite as bad as “Mac vs. PC,” it really gets some people going. Which is better, a fixed-width layout, or a fluid one that resizes to fit the browser window. Unlike some people,…

Why Not to Use Blogger or WordPress.com

If you’re serious about blogging, I strongly advise you to avoid using Blogger, WordPress.com, or *shudder*, LiveJournal. The first thing you should do when you start a blog is get a domain name. At $7-$10 per year, it’s not going to empty your bank…