Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Cascading Style sheets, themes, media and alternative style sheets


Go to End
Reply


10 Posts   4099 Views

Avatar
KatB

Community Member, 94 Posts

22 February 2008 at 6:10pm

What is the smartest way to include a special style sheet that is only in existence for one page and is quite large?

I have tried to over-ride the init function for that page type in its controller:

class Widget_Controller extends Page_Controller {

function init() {
parent::init();
Requirements::themedCSS("widgets.css");
}
}

but to no avail. Should this work?

Avatar
DesignCity

38 Posts

19 March 2008 at 8:47pm

willr: I don't use it often but I have used it before. Adding a title to a css sheet enables you to have alternative style sheets set up in the document that have to be 'selected'. This lets you do reasonably useless things like switching themes, and reasonably useful things like having alternative high contrast stylesheet for users with impaired vision, or an alternative stylesheet with a larger font size etc.

We use them on our corporate site (http://designcity.com.au/) to increase the font size.

Go to Top