Width & Height
You specify the width of the TSViewer in pixels, for example a width of 200 pixels looks like this: overflow rule). The TSViewer code div with a specified width and height looks like this:You can also specify a height if needed (usually not needed), without a specified height the height of the TSViewer will by dynamic (only as big as needed). If you specify a height, the TSViewer will be always have the same height, anything that goes over the specified height will generate a scrollbar or can for example be hidden (controlled by the
The background-color is specified by the CSS background-color rule. You can either write words like black, grey, red, blue, white, etc. or you can specify the color exactly by an HEX code. At this example the background-color is specified by the HEX code for an grey color, its #777777: And here a example with the word grey for the background-color: You use the words if you just need the basic color and you use the HEX code if you need a specific type of color.
This is done by the CSS rule margin. In this example we use the following margins: 10px (top), 5px (right), 15px (bottom) and 0px (left):The order of the margin values is always: top, right, bottom, left.
Multiple CSS rules together
You seperate multiple CSS rules with a semicolon ; betwen them. If we would use all so far explained CSS rules, it would look like this: