‘Disconnect’ between CSS and forms

pts.
Tags:
Domino Designer
Once in a while, often weeks apart, a Domino web application loses the appearance factors that are normally dependent on cascading style sheets. Everything appears with default fonts, colors, etc. The CSS's are stored as pages, the forms are all HTML and the link from form to CSS is coded in the 'HTML Head Content'. The immediate solution is to go into the design and re-save the css pages. But I don't know what causes the problem in the first place and how it can be prevented. Any ideas?

Answer Wiki

Thanks. We'll let you know when a new response is added.

Hi, well in my experience this is generally caused by the page not having the correct text type associated with it, e.g.,
go to the page properties dialog, then ‘Web Access’ -> Content type and choose Other, then enter text/css in the text box that appears. Pages are generally rendered as HTML which conflicts with the text type expected by the browser.

A better alternative would be to copy the CSS from the page, paste to a text editor, TextPad for example, save this to disc. In Notes Designer, open the required db and navigate to ‘Shared Resource’ -> ‘Style Sheets’ and import the CSS file saved earlier. Personally I’m not a fan of the Create resource method of form referencing, but hey I’m not doing it. My preferred method is to then is entering the below line in the HTMLHeadContent form field:

<link rel=”stylesheet” type=”text/css” href=”” + @WebDbName + “/globalStyle!OpenCssResource”>
Hope this helps

Paul

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

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

Forgot Password

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

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

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

Thanks! We'll email you when relevant content is added and updated.

Following