Properties provide an abstraction layer for the complexities of browser event models and DHTML syntax. General Interface prototype components are preconfigured with default property values, which can be modified. These properties are name-value pairs that are displayed in the Properties Editor palette. For example, the properties of a button include some of the following: text/HTML, font size, background color, width, and so on. To modify a property, complete the following steps:
Entering CSS ValuesFor properties that require CSS values, such as padding, margin, and border, you can enter a W3C valid CSS syntax or General Interface syntax. General Interface syntax is a more efficient, concise syntax specific to General Interface. Values are converted to General Interface syntax at runtime. If performance is critical, the General Interface syntax is recommended, because CSS syntax can reduce performance. For examples of General Interface syntax, see the following topics:
For more information on CSS, see Cascading Style Sheets Specification at http://www.w3.org/TR/CSS21/. PaddingThe Padding property (jsxpadding) sets the white-space gap between the outer edge or border of the object to its inner content. When using General Interface syntax, padding is specified as one or four implied pixel values applied in this order: top, right, bottom, and left. General Interface SyntaxThe following are valid General Interface syntax for specifying 8 pixels of padding:
W3C CSS SyntaxW3C CSS syntax is also supported as long as explicit pixel units are used. The following are all valid CSS for specifying 8 pixels of padding:
MarginThe Margin property (jsxmargin) sets the gap between the object's border and its parent and/or sibling containers. When using General Interface syntax, margin is specified as one or four implied pixel values (top, right, bottom, and left). General Interface SyntaxThe following are valid General Interface syntax for specifying 4 pixels for margins:
W3C CSS SyntaxThe following are all valid CSS for specifying 4 pixels for margins:
margin-left:4px; BorderThe Border property (jsxborder) sets the CSS border definition. The border is one or four value sets (top, right, bottom, and left). The General Interface syntax is specified in this form: style width color[;style width color;...] General Interface SyntaxThe following are valid General Interface syntax for specifying a black 1 pixel border:
W3C CSS SyntaxThe following are all valid CSS for specifying a black 1 pixel border:
CSS values of either type can also be used in the Dynamic Properties editor and in JavaScript code using the JavaScript API. For example: myBlock.setBorder("solid 1px red;solid 1px red;solid 1px red;solid 1px red;");
|
Contents
|
