Stylesheets

 

Re-defined standard tags

 

This is just a somewhat longish introductory sentence to have some paragraph text long enough to wrap around and see if the following changes have the desired effect:

- body has a 5% margin left and right.

- h1 headers are red and centered.

- h2 headers are maroon, and have the same margin as the default 5%.

- the standard paragraph is always indented by 8%, justified and darkblue

- the 'em' style has been changed to be italic and bold:

This is what it should be like.

Unsurprisingly, the REB1200 isn't quite up to the standard:

- Don't use colornames, they work rarely, even though you may not get a warning. Just get used to looking up the hexadecimal value.

- 'text-transform' isn't recognized.

- 'background' isn't recognized, 'background-color' is ignored in 'body'. (Which leaves the non-CSS 'bgcolor' as the only option in 'body', see previous chapter)

- using 'em' as unit (not the style-tag) doesn't work, percent, inches and pixels work. Percent is recommended since using absolute values might yield odd results in a different viewer/browser.

- 'margin-xxxx' and 'text-indent' aren't added up, and consequently don't accept negative values, i.e. you cannot define a 10% margin, have the headers to the left (-5%) and an additional 5% indent in regular paragraphs. Everything is in absolute values from the left border.

- 'margin-bottom' is ignored, 'margin-top' doesn't work at the top of a page, unless there's a paragraph first (in addition to the defined margin) i.e. just stick with those   paragraphs...

REB1200 Test Document v0.99                     Header Line


Footnote: Nothing of relevance in this space right now...

 

Headers and Footers

 

The usage of this is still a bit unclear, it seems that:

They can start anywhere in a document, depending on their position in the file, on the nearest page (indepently of the 'pb' tag).

By default they will remain until the end of the document, even over several separate files (following the one in which the header/footer was first defined)

You can turn them off by defining an empty one (i.e. with nothing between <p> and </p>)

There can be only one at a time: if you use the command again, it will replace the previous one. (see the following 3 pages for an example)

The 'class' feature can be used with them.

They are displayed as plain paragraphs in a regular browser, making the layout look rather awkward.

REB1200 Test Document v0.99             Custom Classes


 

Borders and Backgrounds

 

Using the 'div' element:

The content within this DIV element should be enclosed in a box with a dashed line around it.

On the REB1200, once again, it doesn't work. SBpublisher doesn't complain about the div definition per se, but the attributes within (borderwidth, background etc.) then proceeds to declare text enclosed by 'div' as raw, and inserts 'p' tags instead... Using tables seems to be the only remedy at this time.

 

Custom Classes'

 

You can define extra styles for various elements by adding '.YourName' to the element in the style definition, then use it by adding 'class="YourName"' in the element's attribute.

This paragraph is of the 'note' class and attributes are applied accordingly.

This paragraph is of the 'important' class and attributes are applied accordingly.

REB1200 Test Document v0.99                        Font Sizes


 

Numbered versus named fontsizes

 

Test-Text size:1 Test-Text xx-small
Test-Text size:2 Test-Text x-small
Test-Text size:3 Test-Text small
Test-Text size:4 Test-Text medium
Test-Text size:5 Test-Text large
TestText size:6 TestText x-large

 

Note that <font size="1"> and <style="font-size: 1"> are VERY different! (except on the REB1200)

 

Also note that the REB1200 displays the above different from the standard, in which the corresponding sizes start with "small" up to "xx-large".

 

 

 

This concludes the Stylesheet chapter
and this document.