httpremix.com

About the Author

Jonah Ellison lives in Seattle, Washington and works at a web firm developing websites and custom web applications for the LAMP solution stack. He enjoys optimization, front-end usability, databases, clean code and clever solutions. Contact him or learn more.

 

Topics

Web Development Articles & Code Samples

Create “Printer-Friendly” Pages with CSS and the @media Type 2008 May 7

Topics: css — by jonah ellison

There may be a time when a visitor wants to print a page from your website. It’s worth spending five minutes to create “printer-friendly” pages using CSS. (Tip: navigate to “Print Preview” on your browser to see how this page looks when printed out.) Some of you may already know about the <link rel="stylesheet" type="text/css" href="print.css" media="print" /> directive, however, it’s better to place your print CSS within your main CSS file. Instead of having a separate CSS file for printing (which can increase the initial load time since the browser must make an additional HTTP request to the server before rendering the page), place @media print {... } at the bottom of your CSS file. It must be at the bottom to override your previous declarations.

(Read more…)

A Different Approach to Writing CSS 2008 May 3

Topics: css — by jonah ellison

How do you write your HTML/CSS? Do you use unordered lists for links? Lots of whitespace in your CSS file? Don’t know when to use an id selector or a class selector? Learn how and why to change your coding style.

(Read more…)

CSS: How to Style Perfect HTML Lists (<ul><li>, <ol><li>…) 2008 Apr 30

Topics: css — by jonah ellison
Here is an example of a default HTML list with no CSS styling:
  • This is what I consider an ugly HTML list.
  • Almost every website incorporates lists. We love to make lists because it chunks data into separate, easy-to-read pieces.
  • There are several problems with the default style of HTML lists: they have bad spacing and browsers do not play nice with custom bullet images.
    • Spacing Issues:
      1. There is no distinct spacing between list items, which is annoying when reading list items that contain multiple lines.
      2. The initial left indent. Do we really need all that white space in the left margin, breaking up the list from its parent text? No.
    • Custom bullet images: Incorrect alignment across browsers.
  • Let’s fix this.
Here is an example of a styled HTML list:
  • This is what I consider a beautiful HTML list.
  • Almost every website incorporates lists. We love to make lists because it chunks data into separate, easy-to-read pieces.
  • There are several problems with the default style of HTML lists: they have bad spacing and browsers do not play nice with custom bullet images.
    • Spacing Issues:
      1. There is no distinct spacing between list items, which is annoying when reading list items that contain multiple lines.
      2. The initial left indent. Do we really need all that white space in the left margin, breaking up the list from its parent text? No.
    • Custom bullet images: Incorrect alignment across browsers.
  • Let’s look at the code, shall we?

(Read more…)

About Virtual Private Servers

Topics: optimization — by jonah ellison

A Virtual Private Server is the best hosting solution for any serious website or web developer, next to a dedicated machine. By partitioning a physical server, a hosting provider can offer an inexpensive environment with full root access. This means developers can install whatever custom software their heart desires, as well as reboot it at will. Unlike shared hosting, a VPS has its own RAM and CPU blocks, giving stable, reliable performance, starting around $15-$20/month.

(Read more…)

Stages of Mastery 2008 Apr 29

Topics: site meta — by jonah ellison

After spending all day at work developing websites, I sometimes find myself coding more during my freetime as a way to relax. There are no tight deadlines, no clueless clients, no outdated legacy codebases, just a couple ideas I want to see come to life. As I work on my pet projects, I begin see what I’m doing not as a hobby per se, but as a craft. And with any type of craft–writing, playing a musical instrument, painting, mathematics–there are different stages that we go through as we advance and learn more.

(Read more…)

« Newer Posts