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

ArchiveSearch Results

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…)