Border
In any type of template, boxes, tables and table cells, paragraphs, images and other elements can have a border.
Elements have a rectangular shape, so their border has four sides. Each side of the border can have a different layout.
Adding a border
-
Right-click the element and click the respective element on the shortcut menu.
Alternatively, select the element (see Selecting an element) and on the Format menu click the respective element. -
Click the Border tab.
-
Uncheck the option Same for all sides to be able to style each side of the border separately.
-
Specify the width of the border (side). This is equivalent to the
border-width
property in CSS. -
Specify the style of the border (side), such as solid, dashed or dotted. This is equivalent to the
border-style
property in CSS. -
Specify the color of the border (side): select a named color (defined in the Colors Properties) from the drop-down, or click the colored square to open the Color Picker dialog (Color Picker). Alternatively you could type a name or value in the Color field directly. It must be a predefined CSS color name (CSS color names), a hexadecimal color code (HTML Hex Color), an RGB color value, for example
rgb(216,255,170)
or a CMYK color value, for examplecmyk(15%, 0%, 33%, 0%)
.
This setting is equivalent to theborder-color
property in CSS.
Note: It is also possible to set an element's border in a style sheet; see Styling templates with CSS files.
Rounding corners
Any element in a template can have rounded corners. For boxes and images, this option is available in the Formatting dialog. For other elements, you have to create a CSS rule to set the border-radius
of the element (or class of elements).
Boxes, images and tables
To round the corners of a box, image or table:
-
Select a Box, Image or Table element (see Selecting an element) and on the Format menu click the respective element. Alternatively, right-click the element and click the respective element on the shortcut menu.
-
On the first tab in the Formatting dialog (the Box, Image or Table tab respectively) specify the corner radius in a measure (10mm, 5px, 0.5in) or percentage (0 - 90%).
-
For a Box or Image, click Apply to see the effect without closing the dialog or OK to close the dialog.
For a Table, you have to take yet another step. Tables can't have rounded corners and collapsed borders at the same time. All built-in table styles in the Designer have collapsed borders. For the rounded corners to show, you must create a CSS rule that sets the table's border-collapse
property to separate
instead of collapse
.
-
Click the Advanced button at the bottom of the Formatting dialog.
-
Under Property, type border-collapse.
-
Under Value, type separate.
-
Add a padding to keep the table cells from sticking out of the rounded corners: under Property type padding and under Value type a measure for the padding.
-
Click OK, and click OK again to close the Formatting dialog.
If the table's rounded corners are still not (fully) visible, check the styles for table cells. Table cells can have their own background color and by that, hide the table's background color - including the rounded corners. Table cells can have rounded corners as well, just as any other elements; see below.
Other elements
To round the corners of elements other than boxes and images, or to have different roundings on different corners, you have to make use of the CSS property: border-radius
; see MDN Web Docs - border-radius.
This is, for example, how you could round the corners of a paragraph:
-
Select the paragraph (see Selecting an element) and then select Format > Paragraph on the menu, or right-click the paragraph and select Paragraph on the shortcut menu.
-
Click the Advanced button at the bottom of the Formatting dialog.
-
Under Property, type border-radius.
-
Under Value, type the value of the corner radius in a measure (10mm, 5px, 0.5in) or percentage (0 - 90%).
-
Click OK, and click OK again to close the Formatting dialog.
Using a CSS file
Of course you could also add this rule to a CSS file; see Styling templates with CSS files. The following rule sets the border-radius of the corners of all paragraphs to 5 pixels:
p { border-radius: 5px; }.
To make this rule apply to one specific paragraph, first give the paragraph an ID (select the paragraph and type the ID, for example rounded, on the Attributes pane). Then add the ID to the selector of the CSS rule, for example
p#rounded { border-radius: 5px; }
To make the CSS rule apply to a set of paragraphs with the same class, first give the paragraphs the same class (for example rounded). Then add that class to the selector of the CSS rule, for example
p.rounded { border-radius: 5px; }.