Use Cascading Style Sheets

Cascading Style Sheets (CSS) centralize decisions on how web pages are styled - fonts, colors, layouts, and so on.

Some advantages of using CSS :

Support for CSS varies among browsers. Some care must be taken that pages render adequately in the most popular ones.

Some recommendations on using CSS :

Reminders :

Be Aware of Browser Caches

Browsers cache style sheets. If an update to a web site includes changes to a style sheet, then the developer will often need to manually refresh the browser's cache, in order to see the updates (the specifics apparently depend on the browser). However, when deploying such an update, it's not acceptable to expect the end user to do the same thing.

To ensure that all users see the updated version of a stylesheet, there's a simple workaround : just rename the style sheet. Of course, related references need to reflect the new name as well. This will force the browser to always load the updated version.

Would you use this technique?
Yes   No   Undecided   
© 2010 Hirondelle Systems | Source Code | Contact | License | Quotes | RSS
Individual code snippets can be used under this BSD license - Last updated on June 5, 2010.
Over 150,000 unique IPs last month - Built with WEB4J.
- In Memoriam : Bill Dirani -