Tutorials

  • Building a multiple-column layout

    View Comments
    3-columns

    In CSS, building layouts with columns can be quite difficult, especially if the columns all have to be an equal height. This is a common necessity in website layouts for items such as a vertical side navigation or a blogroll. I’ve come across an interesting solution to multiple-column layouts that works in all modern browsers. The catch is that it fails in IE6 and IE7, but I can show you a few ways around that. We’re always hacking IE6 and IE7 anyway, right?

    Read More »
    Did you like this? Share it:
  • Building an accessible, client-side chained selection drop down

    View Comments

    A chained selection drop down, or as I like to call it, “a dynamic drop down,” is a series of single-selection <select> boxes chained together. What makes these selection drop downs chained together is that the options in each drop down are dependent on the selected option in the drop down preceding it. Now, I’ve seen plenty of solutions for this online, but I have not come across a solution that functions when JavaScript is disabled. So, I decided to come up with a solution by building a jQuery plugin.

    Read More »
    Did you like this? Share it:
  • How to use delimiters other than ampersands in URLs

    View Comments

    I recently came across the idea of using different formatting for URLs. By this, I mean doing things such as omitting the question mark before the query string or using a character other than the ampersand to delimit the variables in the query string. This idea is potentially golden. I understand that there are programmers who feel that the standards should be upheld at all times, including when building URLs. However, I also understand that short, readable URLs are ideal and being able to build the URL as you please can help you towards that goal.

    Read More »
    Did you like this? Share it:
  • Extra spacing and incorrect height on list items in Internet Explorer

    View Comments
    dropdown-bug

    Good ol’ IE. There’s a fairly common issue with Internet Explorer and CSS, particularly while using list items. This most commonly arises as an issue when developers are making drop down navigation in which the navigational links are listed vertically. In Internet Explorer 6 and 7, vertical lists will have extra space after each list item. This only occurs when the list items and their children are block elements. There are a few fixes, but I recently learned that one of the accepted fixes works in Internet Explorer 6 and Internet Explorer 8, but not Internet Explorer 7.

    Read More »
    Did you like this? Share it:
  • PHP scripts using __FILE__ break when they are moved

    View Comments
    magic constants in the php manual

    The __FILE__ magic constant contains the full path to the PHP script that it is being used in. The path used is local, not remote. Local paths are meant to be used when dealing with other files in the file system, such as when using the include, include_once, require, and require_once directives, and when opening, editing, and saving files on the server. Since the path on every server is going to be different, and since it’s a value that you expect the average user to be unaware of, using the __FILE__ magic constant allows an application to learn the path without requiring the user to learn it, first. But, once a file using the __FILE__ magic constant is moved, difficulties arise.

    Read More »
    Did you like this? Share it: