Super Simple Stylesheet Organization Tip

Mon 23 Jun 2008

Everyone has their own way to organize their stylesheets, whether it means using creative indention, separating styles into different sheets according to their function, or any one of 1,000 other ways to keep your sanity when working on a large project. I make use of several of these techniques, but lately, I’ve been using one in particular that has helped me out a lot as my stylesheets keep growing. I guarantee it will be one of the simplest, but also most helpful tricks you’ll use.

Basically, like many others, I use comments to signify the start of each section - but with a twist. For instance, I might have something like this:

/** Home page
**********************************/
	some styles...

/** About page
**********************************/
	some more styles...

/** Signup page
**********************************/
	even more styles...

Take note that the start of the comment has the forward slash, followed by an asterisk, just like a standard comment, but also includes an additional asterisk. That single extra asterisk separates the section comments from regular comments and is what’s going to make your life a lot easier. Here’s how:

Let’s say you have a stylesheet that’s 600 lines long. Instead of scrolling through, looking for the section you want to edit, you can just do a “find” in your editor for “/**” and then jump a section at at time by clicking “next”.

You could even take it a step further and use “/***” for major sections and “/**” for sub-sections. Or, if you prefer, you could use “/*/” as the start of your comments. It really doesn’t matter as long as whatever you choose starts with “/*” because anything after that is treated as comment text.

Hulu - Like On Demand, but Better

Tue 17 Jun 2008

Yesterday, Mark Cuban posted about how Hulu is killing YouTube in terms of being able to monetize its content. I had never heard of Hulu, so I checked it out and it’s awesome. It’s a video site that has full episodes of television shows, as well as full length movies - like On Demand, but better.

As of the last year or so, the major TV stations have started providing their shows on their websites, but I like the idea of having it all in one place. This means that I don’t have to navigate different site structures to get to the video, and then download different media players and codecs in order to be able to watch the video.

If you have a HTPC with a web browser, you can watch directly on your TV in your living room.

Filed Under: Web | Leave a Comment 

Testing in IE 5, 5.5, 6, and 7 on a Single Machine

Mon 09 Jun 2008

I’ve always found it a pain to test in the various versions of Internet Explorer. In Windows, there’s no easy way to install multiple versions, so whether you are working on a physical Windows machine, or a virtual machine via Parallels, VMware or some other virtualization software, proper testing in IE always required at least two or three separate machines.

The other day a co-worker showed me a cool little setup that will allow you to test in IE5, 5.5, 6, and 7 on the same physical Windows XP machine. I suppose this would also work on a virtualized copy of Windows XP on a Mac, but since this solution involves virtualization, you’d be running a virtual machine inside of another virtual machine, which means you’d need a heck of a powerful system.

Assuming you are running Windows XP, you should already have a copy of IE7 installed. One IE down, 3 more to go. So, here’s how to get the rest of them:

  1. Download VirtualBox and follow the installation instructions.
  2. Grab the .iso for your choice of Linux distro (Ubuntu, Kubuntu, Xubuntu, Fedora, Gentoo, Debian, Suse, Mandriva, or PCLinuxOS should work at the time of this writing) . I used Ubuntu in my setup.
  3. Launch VirtualBox and setup a new virtual machine for your Linux distro.
  4. Start the virtual machine and follow the prompts in the First Run wizard, making sure to set your media source to the Linux .iso you just downloaded.
  5. Click Finish at the end of the wizard and your Linux distro should start the installation process (this process will vary depending on your distro of choice).
  6. Visit the IEs4Linux website and follow the instructions to install cabextract, Wine and IEs4Linux.
  7. Once you’re done with the install, you should have icons on your Linux desktop for each of the IEs that you installed. Just double-click and point them at the URL you want to test!