O'Reilly logo

Drupal 6 Theming Cookbook by Karthik Kumar

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Adding a conditional stylesheet in Zen

Conditional stylesheets are a frequent requirement to accommodate hacks and workarounds specific to versions of the Internet Explorer browser. While other themes would require us to conditionally introduce said stylesheets either using a module or by inserting the appropriate HTML directly in the page.tpl.php template, Zen-based themes offer a straightforward alternative.

In this recipe, we will be looking at the procedure involved in adding a conditional stylesheet which is loaded only if the browser is Internet Explorer (IE). Furthermore, the version of the browser has to be 7 (IE7) or greater.

Getting ready

This recipe centers around the myzen sub-theme which is assumed to have been created, enabled and ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required