CSS Styling, HTML Designer, Options Dialog Box

The CSS Styling dialog box lets you change default settings for how CSS styling is applied in Design view.

To access this dialog box

  1. In Visual Web Developer, click Tools, and then click Options.

  2. In the left panel, expand HTML Designer, and then click CSS Styling.

    Note

    If your environment settings are configured for Web development, by default the elements of this node are not available. To display them, select the Show all settings check box. For more information about environment settings, see How to: Change Select Settings.

    You can find additional options that affect Design view under the HTML Designer node, which is visible if the Show all settings check box is selected.

For more information about style sheets, see Working with CSS Overview.

Style Application Mode

  • Manual Style Application
    Specifies that by default, when you work in Design view, you must manually apply CSS styles to HTML elements.

    Note

    If you select manual mode for applying styles, some of the style application options listed in the following table are unavailable.

  • Auto Style Application
    Specifies that by default, when you work in Design view, Visual Web Developer automatically applies CSS styles to HTML elements.

    Note

    If you select automatic mode of applying styles, all style application options are available.

Style Application Options

  • Only reuse classes with the prefix "style"
    (Automatic style application mode only) Specifies that you can reuse CSS classes that are named with the prefix "style". In manual mode, you must manually name and apply all classes.

  • Use width and height attributes for image instead of CSS
    Specifies that the dimensions of an img element are set by using the width and height attributes instead of by using CSS styles.

  • Use <strong> and <em> for bold and italic text
    (Automatic style application mode only) Specifies that text that is formatted as bold is marked by using a strong element instead of a b element. Text that is formatted as italic is marked by using an em element instead of an i element.

    In manual mode, if you apply bold or italic formatting to text in Design view, the b and i elements are used.

  • Use shorthand properties when generating styles
    Specifies that when Visual Web Developer auto-generates styles, it uses the shorthand or combined style of CSS properties instead of using separate styles for each item. For example, instead of specifying each margin aspect with a separate style (such as margin-left, margin-right), Visual Web Developer generates one style entry (margin:) and specifies the left, right, upper, and lower margin details within that one style specification.

  • Change positioning to absolute for controls added using Toolbox, paste or drag and drop
    Specifies that when you create elements by pasting them, by dragging them, or by using the Toolbox, the elements are positioned by using absolute CSS positioning.

See Also

Reference

Display, HTML Designer, Options Dialog Box

General, CSS, Text Editor, Options Dialog Box

CSS Editor

Format, HTML, Text Editor, Options Dialog Box

CSS, HTML Designer, Options Dialog Box