Tip

End-user customizable CSS on the Web

1 USER 1 STYLE, 100 USERS 100 STYLE!

In the code section, you'll find step-by-step description of my solution.


Create a Page that contains the class (example myStyle.css) like this:

 H1 { font-family: Comic Sans MS; font-size: 12pt; text-decoration: normal; color: midnightblue; text-align:Left ; letter-spacing: 0em; } .Table { font-family: Comic Sans MS; font-size: 8pt; text-decoration: normal; color: midnightblue; margin:0px; padding:1px; background-color:skyblue; border-width: thin; border-style: solid; border-color: cornflowerblue; text-align:Left ; letter-spacing: 0em; } ( continue with other class..)

...where the values are not static, but like this:

 @Subset(@DbLookup("";"";"vCfgCSS";"ActiveStyle";"tFontColor_tab");1)

In the view vCFGCSS, select the ActiveStyle document FOR THE CURRENT USER!. In fact, any user can create the documents CSSstyle with the AUTHOR and READERS fields and choose what is 'ActiveStyle'. Document CSSStyle contains all the fields for the Page myStyle.CSS (example tFontColor_tab="midnightblue").

In all the forms, in the HTML head content: "<link href="/" + DBPath + "/myStyle.css" rel="stylesheet" type="text/css">" (DBPath is a field with: @ReplaceSubstring(@Subset(@DbName;-1);"\";"/") )

Result: 1 USER 1 STYLE, 100 USER 100 STYLE!

This was first published in August 2001

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.