|
Using CSS |
|
|
Use CSS to change the look of your Live Communication dialogs The style and layout of Sales-n-Stats 'Live Communication' dialogs and popup windows can be controlled using CSS (Cascading Style Sheets). The styles defining how to display the elements of these dialogs and windows are stored in the external style sheet style.css. Modify this file to change colors, fonts, spacing and other properties.
The file style.css consists merely of style rules in the format of selector {property: value} The selector is the HTML element/tag being defined, the property is the attribute which can be changed, and the value is the value this property can take. The property and value are separated by a colon and surrounded by curly braces. If more than one property is specified, each property is separated with a semi-colon. The example below shows how the look of a link is defined: A.sns:link { When more than one selector use the same style definition, the selectors may be grouped: body.sns, p.sns, div.sns, th.sns, td.sns, input.sns, select.sns, textarea.sns span.sns { If the tag name in the selector is omitted, it means the style is used by all HTML elements that have this class. In the example below, all HTML elements with class="sns_WindowBack" have a white background color: .sns_WindowBack { Generally speaking, find out the style of any HTML element by the class attributed to it. For example, to know what style rules regulate the appearance of the dialog title, find the template that defines the look of the dialog header and find in this template the lines defining the look of the title. There will be an indication of the class attributed to the dialog title element. The name of the header template is header.inc. Open it and find the following lines: {Subheader} The fragment class=sns_Header means that the title follows the rules in the ".sns_Header" selector. Now open the file style.css and find the appropriate style definition: .sns_Header { Knowing the properties of the dialog title element, you can modify the look of text appearing in the title. Before any modifications are made to the file style.css, the dialog 'Start communication': Open chat with operator looks like this: ![]()
If you then edit the file style.css so the style definition looks like this: .sns_Header { the appearance of the title will be changed:
![]()
Similarly change the look of other elements. Further reading on CSS: W3C Cascading Style Sheets homepage: http://www.w3.org/Style/CSS W3C CSS Validation Service: http://jigsaw.w3.org/css-validator/ |