Lateral Code
A Web Development Blog Focused on Code and Technology
Currently Browsing: Home » Posts tagged 'css' (Page 2)
Posts Tagged ‘css’
Remembering the User’s Preferred Color Scheme
By Patrick Lin on Saturday, September 19th, 2009 | Tags: css, php | No Comments »
Last time, we showed you how to set up alternate color schemes using PHP. As promised, we will now show you how to remember the user’s choice.
We will once again make use of PHP, this time cookies. We will explore how to set the cookie for the user’s choice, and two methods of using this information.
First, we shall create a file. For purposes of demonstration, this file shall be called switch.php.
Stunningly Simple CSS Minifier
By Karthik Viswanathan on Sunday, September 13th, 2009 | Tags: css | 27 Comments »
Creating a beautiful and eye-catching website can often require you to have a hefty CSS file. Unfortunately, this side-effect takes away from your visitors experience; they spend more of their time downloading rather than viewing. In essence, a balance needs to be reached in order for full optimization.

Solving the problem
One simple way to achieve this balance is by using a minifier. By taking a CSS file in as input, a minifier removes white space and other unnecessary elements to significantly reduce file size.
Alternate Color Schemes Using PHP
By Patrick Lin on Thursday, September 10th, 2009 | Tags: css, php | 2 Comments »
One great use for PHP is alternate content depending on different inputs. In this article, we will show how to serve up alternately colored style sheets via PHP.
Disclaimer: This makes use of CSS variables, over which there has been much debate. This article will not discuss whether one should or should not use CSS variables, only present a way to use them.
First, the call in the HTML will no longer call a CSS file, but a PHP file.
<link rel="stylesheet" type="text/css" file="styles.css" />
to
<link rel="stylesheet" type="text/css" file="styles.php?color=green" />
Of course, color can be any nomial you wish, and green can be any color you wish, or even the name of a color scheme, such as hotlava.
12 Brilliant CSS Frameworks
By Patrick Lin on Wednesday, May 20th, 2009 | Tags: css | 1 Comment »
CSS Frameworks are extremely helpful and time-saving. When you are making a website, do you really want to spend a bunch of time figuring out positions and making print stylesheets? CSS Frameworks save you time on everything from resetting styles to common things that Internet Explorer break again and again.
1. blueprint
5 Solid CSS List Posts
By Patrick Lin on Thursday, May 7th, 2009 | Tags: css | 1 Comment »
CSS is arguably the second most important element in modern web development, with the first being HTML. After all, without CSS, HTML would just be unformatted and hard-to-read. Therefore, it is always good to know more CSS Tricks and Techniques. Thus, I present to you 5 very solid CSS List Posts.

