Two methods for referencing CSS files in Domino

Interested in using the same stylesheet throughout your Web site? Want to see how? Here are two easy ways!

OPTION 1) Using a page or form
-Paste your CSS code into a form/page.
-Select the "Treat contects as HTML" form/page property.
-Do not include the style tags.
-Comment your code like you would HTML. (ie. <!-- ##### DHTML Business Menu Anchors ##### --> )

OPTION 2: Using Image Resource
-Create a new Image Resource, Select your CSS file.
-Name it manually including the extension. (i.e. stylesheet.css)


-Paste the following code into the HTML Head Content object on a page/form: (Or, for 4.6 users, into the $$HTMLHead field.)

"<LINK REL=stylesheet TYPE="text/css" HREF="aliasOfStylesheet?OpenPage">"

Above, the stylesheet was created on a page. If you used a form, it would be ?OpenForm. Likewise, ?OpenImageResource for an Image Resource using the whole filename.

Which is better?
If your good at modifying CSS on the fly, it may be useful to use a form/page to quickly modify the style. Otherwise, use a CSS editor and delete/reattach the new file when you edit it. Image Resource is best used if multiple sites refernce the same stylesheet.

Note: a third way would be pasting your CSS code into a subform, and including it on a form. Cons: 1) You have to use a form. 2) I've experienced inconsistencies with how the browser reads and caches the file.

This was first published in January 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.