Killersites.com - Web Design Resources

View Cart

Archive for April, 2006

Book Review: PHP Hacks

Wednesday, April 5th, 2006

PHP Hacks is essentially a collection of ‘bite-size’ PHP scripts that you can easily drop into your websites.

Besides being able to use the hacks straight away in your projects, the PHP code/hacks are clearly explained making them good tutorials for learning how you might do something in PHP.

SOME TOPICS/HACKS THAT STAND OUT:

  • Creating a shopping cart.
  • Using AJAX with JSON – a php library that makes working with AJAX easy.
  • PEAR hacks like Net-Geo to find out state and city locations of people.
  • A good examination of PHP design patterns.

Not exactly for beginners, but if you have an understanding of basic PHP you will be OK and you will learn a lot. This book is also good for programmers (from other languages) who want to get a good idea of what tools, libraries are available in the PHP world.

Another good book from O’reilly.

The Matching Columns Script Video Tutorial: Matching CSS div Heights

Tuesday, April 4th, 2006

One of the fundamental problems people have with CSS page-level layout is matching CSS div heights. Others might call this ‘matching column heights’ in web pages.  

In this article/video (see below,) we are going to solve this problem using a lesser known JavaScript method: the Matching Columns Script.

Let’s start  out by checking out a diagram that illustrates the problem:

Diagram of div heights problem.

People have come out with different solutions including the ‘Faux columns’ hack:  using a vertically tiled background image to create the illusion of a column.

The ‘Faux columns’ hack/trick works, but it does have some limitations:

  • You have to mess around with background images when creating the fake/faux columns effect – there is even more mucking about when you have liquid layouts.
  • You won’t be able to use CSS border styling (on your div’s that create the columns) because it would reveal the hack.

THE BETTER WAY TO HANDLE THIS PROBLEM: DOM SCRIPTING (JavaScript)

JavaScript (sometimes called ECMA script,) is the programming language built into all the browsers that allow geeks/nerds, to have practically total control over how things appear in a web page – it’s very powerful.

Note: DOM scripting (the term,) is a quick way to describe using JavaScript to control a web page’s structure. If this makes no sense, don’t worry about it as you need no programming knowledge to use the technique that is covered here. 

 WHY IS THE JAVASCRIPT METHOD BETTER?

You are better off with the JavaScript method (rather than the ‘Faux columns’ hack, ) because:

  1. Once it is applied, you don’t have to worry about it as it automatically adjust itself to change with your page(s).
  2. It is much easier/faster to apply than the ‘Faux columns’ hack.

 GETTING STARTED

Attached with this article you will find the files you need to apply the script:

  1. The Javascipt file.
  2. The CSS document.
  3. A sample web page that puts it altogether.

Now it’s time to watch the video to learn how to use it.

 MATCHING DIV HEIGHTS VIDEO


CONCLUSION

There is one downside to this technique:

It won’t work if people have JavaScript turned off. Fortunately, the vast majority of people out there have it on. Last time I checked my own stats, nobody had JavaScript disabled.

That said, though it looks a lot better when your columns heights match, I would not consider it mission-critical to a website. That is to say; people will still be able to use the website, so I am willing to accept that for some rare (paranoid) individuals, the columns will not match.

Source Files

 

How to start earning money with your website.

Monday, April 3rd, 2006

I get emails all the time from people asking all kinds of interesting questions; once in a while I post them on the blog or in my newsletter.

This time around someone wanted to know about earning ad revenue with a website:

Me and my business partner have currently set up a new site and we are wondering if you have any advice as to how we should start to make it earn us money. Do we build up the trafic first? or do we get the paid for links & ads first?


MY ANSWER:

The life-blood of any site (that those that depend on ad revenue,) is the the traffic. I’ll even go a step further: the value of a site is the traffic and the quality of the traffic. I think you guessed the answer by now … but just in case, you need traffic first.

Once you have traffic, people will contact you to buy ad space. I get lots of request and refuse the vast majority. Why? Killersites.com gets over 1 million+ pageviews a month of very high quality traffic.

Hope that helps,

Stefan Mischook (The Web Design Heretic)

© 2009 - Killersites.com - All rights reserved
  • Hosting and domain name support:
  • (480) 624-2500

PayPal Customer Support: 1-888-221-1161

Killersites.com has been a PayPal Verified Merchant since 2001. We also accept payment via check or money order.

Please send payment to:

Killersites.com Inc. 4156 Dorchester #2 Westmount, Quebec Canada H3Z 1V1

The more you learn, the more you earn!

Subscribe to our newsletter
Unsubscribe