Opera User Stylesheets

From CSS Discuss

Jump to: navigation, search

Opera has very configurable options for User Stylesheets. One particular use of user stylesheets is for diagnostic purposes - see Diagnostic Css.

Single user style sheet

You can define a single user style sheet which can be switched on and off on demand so that you can use it to view any Web site you choose.

Go to Tools - Preferences - Advanced - Content - Style Options and select the Display tab. Specify a local file as "My style sheet". Then, in the Presentation Modes tab, make sure My style sheet is checked under User Mode.

You can toggle the user style sheet on and off by switching between Author Mode and User Mode. You can do this by selecting Style from the View menu; or by using the button on the Main bar; or with Ctrl-G (in Windows).

The style sheet can be in any folder you want. A convenient place is in your Opera user profile, for example, C:\Documents and Settings\username\Application Data\Opera\Opera\profile\styles\user.

I keep my own user style sheet permanently switched on. It contains minimal rules to expose the use of iframes and so warn me of possible cross-site scripting and other attacks.

Multiple user style sheets

Opera (since version 7) goes further and allows multiple user style sheets to be invoked, on demand, at the same time. Opera contains some predefined user style sheets for diagnostic, accessibility and text browser emulation purposes, which are well worth exploring.

You simply place your user style sheets in your Opera user profile (see above). You will find Opera's predefined user style sheets already in there. You can switch one or more of them on by selecting Style from the View menu; or by using the button on the Main bar.

All user style sheets - yours and Opera's - are displayed in alphabetical order by name. You can name your own by including an initial comment line thus:-

/* Name: My on-demand user style sheet */

About this page

Page first contributed by James Card (to whom grateful acknowledgments) and extended and updated for Opera 9 by Jim Wilkinson .

Personal tools