2022.2

Table Of Contents
l
AnattributeofanHTMLelement.Typetheattributeand,optionally,itsvalue,betweensquare
brackets,e.g.:[target],toselectHTMLelementswithamatchingattribute.
l
Apseudo-class.Forexample,tr:nth-child(even)selectsalleventablerows.
Thesecomponentscanbecombinedindifferentways.Forexample,p divselectsallparagraphs
inside<div>elements,whilep, divselectsallparagraphsandall<div>elements.
Acompletelistofselectorsandwaystocombinethem,andatoolthatdemonstratestheirusecanbe
foundatW3Schools:http://www.w3schools.com/cssref/css_selectors.asp.
AvideoaboutCSSandScriptSelectors,canbefoundhere:ConnectwithEvie6-CSSandScript
Selectors.
OLConnectclassesandattributes
OLConnectitselfsometimesaddsaspecificclassorattributetoelementsinatemplate.Capture
OnTheGowidgets,forexample,havearoleattributethatallowstheCOTGlibrarytodictatetheirbeha-
viour.OLConnect-specificclassesandattributescanbeusedinselectors,aswillbeexplainedand
demonstratedbelow.
OLConnect-specificclassesusuallyareinvisibleintheDesigner.Byopeningthecurrentlyselected
sectioninyourdefaultwebbrowser(clickthePreviewHTMLtoolbarbutton)andusingthebrowser's
codeorsourceinspectoryoucanseemostofthedynamicallyaddedclasses.
Caution: Avoidusingclasseswiththe__olprefixinyourselectors.Thesedynamicallyadded
classnamesmaychangeinfuturereleasesofthesoftware.
Section selector
TheDesignerwritesthenameofeachsectiontothesectionattributeofthe<html>element.This
attributecanbeusedinselectors.
Note: Tomakescriptsrunexclusivelyoncertainsections,itisadvisedtoputthemin
foldersandsettheexecutionscopeofthescriptsinafolderviathefolderproperties;see
"Executionscope"onpage815.
Example: Thefollowingruleappliesformattingto<h1>elementsinsectionsofwhichthename
startswith‘Letter’:
[section^='Letter'] h1 {
color: brown;
}
Page 826