Export (0) Print
Expand All

Set border, padding, and background properties

You can add a border, background color and image, and spatial padding to items in a web page or the entire web page by using the Borders and Shading dialog box. You can also set padding in Design view. For more information, see Set margins, padding, and dimensions in Design view.

If you add a border by using the Borders and Shading dialog box, you can customize a border's style, width, and color. When you want to quickly add a preset solid and black border that is 1 pixel wide and padded, use the Outside Borders button Cc295325.f30758bd-2d63-41ba-804c-12c47b3487e3(en-us,Expression.10).bmp (default setting) on the Common toolbar. The button's ScreenTip name and appearance change to reflect the current selection.

When you use any of these methods, Microsoft Expression Web produces the formatting for you by creating either an inline style or a style that uses a class selector (default), depending on the associated style application settings. To modify these settings, see Set preferences for generated CSS.

To apply a preset border

  1. In Design view or Code view, in your web page, select the item you want to apply a border to.

  2. On the Common toolbar, either click the Outside Borders button Cc295325.f30758bd-2d63-41ba-804c-12c47b3487e3(en-us,Expression.10).bmp or click the arrow next to the button and then select a border style.

To set a border, padding, and background for an item

  1. In Design view or Code view, in your web page, select the item you want to format.

    Cc295325.alert_tip(en-us,Expression.10).gifTip:

    To add a border to the entire web page, in Code view, select the <body> tag.

  2. On the Format menu, click Borders and Shading.

  3. In the Borders and Shading dialog box, on the Borders tab, do any of the following:

    • To format a border, set options under Setting, Style, Color, and Width sections.

    • To include a border on only some sides of your item, under Preview, select only those buttons that represent the sides you want to have a border.

    • To set the amount of space that appears either between the border and the item or the border and the contents of the item, under Padding, set values in the Left, Right, Top, and Bottom boxes.

      Cc295325.alert_tip(en-us,Expression.10).gifTip:

      The Padding property adds space even if you don't set a border.

    • To format the shading of the item, on the Shading tab, set options under Fill.

    • To add a background picture to the item, on the Shading tab, under Patterns, set the URL to your picture in the Background picture box, and then, optionally, set any of the remaining options to control the position and behavior of the background picture.

Community Additions

ADD
Show:
© 2014 Microsoft