2022.2

Table Of Contents
l
AcombinationofHTMLelements,separatedbyacomma.TheCSSrulewillapplytoall
HTMLelementsthatarelistedintheselector.Forinstance,aCSSrulewiththeselector
h1, pappliestofirstlevelheadingsaswellasparagraphs.
l
HTMLelementsinsideotherHTMLelements.Forinstance,aruleforallparagraphsinside
adivelementhastheselector:div p.
l
Etcetera.Seehttps://www.w3schools.com/cssref/css_selectors.aspformoreCSSselect-
orsandcombinationsofCSSselectors.
5. Selectthelayoutoptionsthatshouldapplytoselectedelements;see"Stylingandformatting"on
page671.Note:whereawidthcanbesetasapercentage,itisapercentageofthespace
betweentheleftandrightmargin.
6. ClicktheApplybuttontoseehowasettingaffectsanyelementsthataresubjecttotheselector.
(YoumayhavetomoveandresizetheStylesheetdialogbeforeopeningtheEditRuledialog,in
ordertobeabletoseethetemplatethatyouareworkingon.)Ifalliswell,clickOK.
7. IntheStylesheetsdialog,clicktheselectorthatyouchose.AllCSSrulesforthatselectorwill
becomevisibleinaboxbelowthelistofselectors.
Editing plain CSS
l
ClickthebuttonAdvancedinanypropertysheettoopenaCSSpropertyeditor.TypeCSSprop-
ertiesattheleftandvaluesattheright.
l
IntheResourcespaneattheleft,double-clicktheglobalstylesheetorthestylesheetfortherel-
evantcontext.Thefileopensintheworkspaceinthemiddle.
AlistofallCSSpropertiesandtheirpossiblevaluescanbefoundhere:https://www.w3schools.-
com/cssref/.
CustomCSSpropertiescanbeusedaswell;foranexplanationandexamplesofthesesee:
https://developer.mozilla.org/en-US/docs/Web/CSS/--*.
Tip: Right-clickandchooseFormat,orpressCtrl+Shift+Fto"pretty-print"theCSSandmakeit
easiertoreadandedit.
Note: Blockcomments(/*...*/)areallowedinCSS,butsingle-linecomments(//...)arenotstand-
ardandmightnotworkasexpectedinallbrowsers.
IntheDesigner,syntaxhighlightingdoesn'tworkonsingle-linecommentsinCSSfiles.
Step 2: apply CSS to the content
AftereditingtheCSSfile(s),makesurethattheCSSrulesactuallyapplytooneormoreelementsinthe
template.
Page 677