CSS and Scrollbar Color Issue

Hello and TIA for any solutions, insight or shared experiences.

I am wrapping up a web application, within which I am using a CSS file to create a color for the scrollbar throughout the app that matches the overall look and feel of the UI. I works well, however, it does not apply to saved documents. I am using a div tag to create the scrollbar in a dynamic table within the form. I am referencing the css file via pass thru html towards the top of the form. It works great, but when the document is saved, then refreshed, or saved, then re-opened, the color of the scrollbar defaults back to, well, default colors. See below:

reference to css:

contents of the colours.css file, a shared database resource:

BODY

{ scrollbar-3dlight-color: #444444; scrollbar-arrow-color: #BBBBBB; scrollbar-base-color: #202020; scrollbar-darkshadow-color: #000000; scrollbar-face-color: #6699CC; scrollbar-highlight-color: #999999; scrollbar-shadow-color: #000000; }

The div tag that wraps the embedded view which is the html table where the scrollbar is being applied:

Subject: CSS and Scrollbar Color Issue

You probably don’t have a BASE HREF tag before the LINK tag? A form opens directly from the database, ie /directory/database.nsf/myform?openform, while a document opens from a view, ie /directory/database.nsf/view/document?opendocument, so if the css file is saved as a css resource, the web browser can’t find it. If you check in the log, you will find that the http task is reporting a bunch of calls to /directory/database.nsf/view/colours.css that can’t be found.

You need to specify a BASE HREF in the HTML header of the form, search this forum for the best way to create the BASE HREF tag dynamically.

/Peter

Subject: RE: CSS and Scrollbar Color Issue

thanks Peter you put me on the right track. I found a thread along the lines you described I ended up creating a page in the database, naming it after my css file and copying its contents into it, and adding this code to the HTML Head Content of the form, where “host” is a computed field with the formula @GetHTTPHeader(“Host”):

“<base href="http://”+ host +“/”+@WebDbName +“/" />”;

“<link rel="stylesheet" type="text/css" href="/”+ @WebDbName +“/colours.css">”

This worked. Thanks.