A fresh mix of code snippets and tutorials

Category Archive: CSS

Posts about CSS

Page 3 of 4

Add links to HTML/CSS Validator

Here are some notes and markup examples for adding links to the W3C’s online HTML and CSS validators. This will enable your visitors to check any page on your site.

CSS Target Opera

Here are some nice CSS techniques for targeting old and new versions of Opera.

Remove borders & outlines in IE

For the DigWP redesign, I noticed that some linked images were displayed with an unwanted border (or outline) in IE. After the usual CSS techniques failed to work, I experimented a bit and discovered a simple solution.

Tip for resizing images

Here is a quick tip for getting clearer images when reducing their size at web resolution 72dpi.

WordPress enqueue user-agent stylesheets

WordPress makes it clean and easy to enqueue custom stylesheets via the functions.php file. Here’s how to do it for user-agent stylesheets.

PHP Compress CSS & JavaScript

Quick snippets for compressing CSS and JavaScript with PHP’s ob_gzhandler, which will gzip or deflate content depending on browser support.

CSS transition effect for links

CSS transitions can add a nice effect to links. Here are some quick example snippets for your copy/paste enjoyment.

Automatic versioning for enqueued stylesheets

Learn how to append the theme version, random number, or both as a query-string parameter to your CSS stylesheet URLs. This is useful for automatic versioning, cache-busting during development, or both.

CSS content for list items

Quick snippet for replacing default list-style types (bullets, discs, squares, etc.) with custom generated content in CSS.

Tabbed sidebar menu with jQuery

Here’s an clean, simple way to add a tabbed sidebar menu using jQuery. You can see an example in the Introspection WP Theme.

Google Translate in 2 Steps

Follow this simple two-step tutorial to enable users to translate your web pages into many different languages. Great way to increase exposure and traffic.

Targeting different versions of IE

Honestly I can’t stand Internet Explorer. But people still use it, so here’s a few ways (via jQuery & CSS) to target different versions of IE.