Manage Learn to apply best practices and optimize your operations.

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!

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

PART ONE: PLACEMENT OF THE CSS FILE

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)

INCLUDING THE FILE

-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.

Dig Deeper on Domino Resources - Part 4

SearchWindowsServer

Search400

  • Favorite iSeries cheat sheets

    Here you'll find a collection of valuable cheat sheets gathered from across the iSeries/Search400.com community. These cheat ...

  • HTML cheat sheet

    This is a really cool cheat sheet if you're looking to learn more about HTML. You'll find just about everything you every wanted ...

  • Carol Woodbury: Security

    Carol Woodbury

SearchDataCenter

SearchContentManagement

Close