Manage Learn to apply best practices and optimize your operations.

Use computed text to write cross-browser & cross-platform CSS

Annoyed by how Netscape renders a font size differently than Internet Exlorer...or how a Mac renders different from Windows?

Annoyed by how Netscape renders a font size differently than Internet Exlorer...or how a Mac renders different from Windows? Domino has a feature no other Web platform offers, computed text! Its easy to fix these browser and platform differences with CSS. Here's how...

Modify your exisitng CSS to use Computed Text where ever the differences occur. (Your CSS will need to be a page or form and not an Image Resource in order to do this.)

Since the prime differences occur in frame spacing and font sizes, I've provided examples for both.

Sample CSS:
a { cursor:auto; font-family: Arial, Helvetica, sans-serif; font-size: 12px; font-weight:bold; color: #006}

In this scenario, create computed text to replace the 12px for the font-size. The formula would be:

@If(@BrowserInfo("BrowserType")="Netscape" &

*Notice Mac NS renders the same as IE!

*Use pixels instead of point size to make your CSS campatible across platforms. If you wanted to use point sizes, similar code would be:

@If(@BrowserInfo("BrowserType")="Netscape" &

Since Netscape rounds to the nearest 5 pixels, your frameset may not appear exactly as you like. For instance if the graphic you designed is 80 pixels high, you would like your frame to be as well.

Here's code to help:
Partial Frame HTML:

Replace the 76 with Computed Text:

*Unfortunately, this means you would not be able to use Domino frames, and you would have to copy the code it usually renders into a page where you can adjust the code as needed.

This was last published in January 2002

Dig Deeper on Domino Resources - Part 4

Start the conversation

Send me notifications when other members comment.

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

Please create a username to comment.




  • iSeries tutorials's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...