View Single Post
Old 01-09-2009, 06:26 PM   #23
llasram
Reticulator of Tharn
llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.
 
llasram's Avatar
 
Posts: 618
Karma: 400000
Join Date: Jan 2007
Location: EST
Device: Sony PRS-505
Quote:
Originally Posted by Amalthia View Post
Or is the display:block added like {display:block; text-indent: 0in; page-break-after:always}
Yep, that one's right. The basic CSS syntax is:

Code:
SELECTOR { PROPERTIES }
The SELECTOR specifies what elements the list of PROPERTIES applies to. So in your case you have ".toc". The "." is the "class selector," which means "any elements with a 'class' attribute of what follows". The PROPERTIES are all of the form:

Code:
PROPERTY: VALUE;
But you can have any amount of whitespace (spaces and new lines) between any of the elements, as long as everything is in the right order. So you can have e.g.:

Code:
.toc {
  display:block;
  text-indent: 0in;
  page-break-after:always;
}
as long as the opening curly-brace is between the selector and the properties and the closing curly-brace is after all the properties. (The semicolon after the last property in the list is technically optional, but it doesn't hurt to have it.)

So that will make any element with a 'class' attribute of 'toc' become a block element which doesn't indent anything within the element, and has a page break after the end of the element.
llasram is offline   Reply With Quote