Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Adjust title

How to set the CSS/Theme of a D2W Page

Diva look introduces a new D2W key: stylesheet.
The CSS file computed by this key will be set as the global stylesheet for the application.

...

LHS

key

RHS

session.theme = 'Simple'

stylesheet

Simple.css

A closer look at the CSS file...

1. CSS Imports
Code Block
@import url("_Neutral.css");
@import url("ERDIVEditPage.css");
@import url("NeutralEditToManyFault.css");
@import url("NeutralEditToOneFault.css");
@import url("NeutralCalendarDateSelect.css");
@import url("NeutralAjaxAccordion.css");
@import url("NeutralEditToOneRelationship2.css");

...

Note
titleNote

IE has a limitation of a max. of 32 CSS files per page (and a depth of 3).

2. Image Replacement
Code Block
div#a h1.edit {
	background: url(/WebObjects/Frameworks/JavaDirectToWeb.framework/WebServerResources/EditMetalBan.gif) no-repeat;
	text-indent: -5000px;
}

...