Currently Browsing: Home » Posts tagged 'css' (Page 2)

Posts Tagged ‘css’

Remembering the User’s Preferred Color Scheme

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.

Read the rest of this entry »

Stunningly Simple CSS Minifier

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.

CSS

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.

Read the rest of this entry »

Alternate Color Schemes Using PHP

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.

Read the rest of this entry »

12 Brilliant CSS Frameworks

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

blueprint

Read the rest of this entry »

5 Solid CSS List Posts

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.

CSS

Read the rest of this entry »

« Older Entries

Newer Entries »