Adding Backgrounds to Text Boxes

You can add background settings to a text box. This includes the ability to specify a color, an image, and a repeating pattern for the background image. 

How to Add a Background to Text Boxes

  1. Open the stylesheet you want to modify or create a new one.
  2. Complete one of the following sets of steps, depending on whether you want to use the Simplified view or Advanced view in the Stylesheet Editor.

    • Simplified The Simplified view displays styles in a grid view and is often best for brand new users.

      This view provides an easy way to apply properties to styles, with format options available from a toolbar and dialogs (similar to the way one would use an interface such as Microsoft Word). In some cases, only the most common property options are available in the Simplified view (e.g., font, letter/word spacing, paragraph alignment/indentation, autonumbering format, borders, background). One advantage of the Simplified view is that you can apply a property to multiple styles at the same time. You can also click a check box to hide the properties in the editor, allowing you to see only the styles.

    • Advanced The Advanced view displays styles in a tree structure, and despite the name, is user friendly for authors of all levels.

      For the properties, you can toggle between a grouped display and an alphabetical display. The Advanced view of the Stylesheet Editor lets you edit more settings than are available in the Simplified view. In addition, the Advanced view lets you see and apply settings to multiple mediums and media queries at the same time.

    If Using Simplified View

    1. In the local toolbar, make sure the first button displays The button to change the stylesheet to the simplified view. (which means that the Simplified view is currently shown in the editor). If the button displays The button to change the stylesheet to the advanced view. instead, then click it.
    2. In the upper-left corner of the Stylesheet Editor, click in the drop-down field and select The paragraph style category selected in the types of styles drop-down list..
    3. Select the appropriate div style. If you use the default style when inserting the text boxes, then select div. Otherwise, if you have used a class of that style that you created previously, then select it instead.
    4. In the local toolbar of the editor, click Display properties for the selected item.. The Properties dialog opens.
    5. Select the Background tab.
    6. Use the tab to specify the settings that you want for the background.

      To set a color for the background

      In the Color field, click the down arrow and select a color from the popup. For advanced color options, select More Colors and use the fields in the Color Picker dialog.

      To add an image to the background

      1. Next to the Image field, click the Browse button. The Insert Image dialog opens.

      2. Select an image file to insert. You can do this in one of the following ways.
        • Select an image already in the document by finding and selecting it in the built-in tree.
        • Click The browse ellipsis button opens to more options. to find and select an image file outside of the document.

        Note If you want to select an image file recently inserted into your document, click the down arrow in the field next to the The browse ellipsis button opens to more options. button, and select the file from the list.

      3. Click OK.
      4. If you want the background image to repeat, select one of the options from the Repeat field. You can also set the image position horizontally and vertically by using the X and Y fields.
    7. In the Properties dialog, click OK.

    If Using Advanced View

    1. In the local toolbar, make sure the first button displays The button to change the stylesheet to the advanced view.. If the button displays The button to change the stylesheet to the simplified view. instead, then click it.
    2. In the upper-left corner of the Stylesheet Editor, click in the drop-down field and select The paragraph style category selected in the types of styles drop-down list..
    3. Select the appropriate div style. If you use the default style when inserting the text boxes, then select div. Otherwise, if you have used a class of that style that you created previously, then select it instead.

    4. From the Show drop-down list on the upper-right side of the editor, select Show drop-down set to display all properties in styles..
    5. (Optional) You can use the toggle button in the local toolbar to show properties below in a group view Stylesheet local toolbar button to show properties in a group view. or an alphabetical view Stylesheet local toolbar button to show properties in an alphabetical view..
    6. If you are using the grouped view, expand the Background group.
    7. Locate the background property that you want to change.

      To set a color for the background

      To the right of background-color, click Display more options. and select a color. For advanced color options, click and use the fields in the Color Picker dialog, or click to select a color already used elsewhere on your screen.

      To add an image to the background

      1. To the right of background-image, click Display more options.. The Insert Image dialog opens.
      2. Select an image file to insert. You can do this in one of the following ways.

        • Select an image already in the document by finding and selecting it in the built-in tree.
        • Click The browse ellipsis button opens to more options. to find and select an image file outside of the document.

        Note If you want to select an image file recently inserted into your document, click the down arrow in the field next to the The browse ellipsis button opens to more options. button, and select the file from the list.

      3. If you want the background image to repeat, click Display more options. to the right of background-repeat and select one of the options from the drop-down (definitions from http://www.w3.org).
        • no-repeat The image is not repeated: only one copy of the image is drawn.
        • repeat The image is repeated both horizontally and vertically.
        • repeat-x The image is repeated horizontally only.
        • repeat-y The image is repeated vertically only.
  3. Click Save the active file. to save your work.

Note You cannot use stylesheets for this feature in the Review (Full Registered) workflow.

Note This feature is not supported for MadCap Lingo review package (LIREV) files.