Loading
Extend Salesforce with Clicks, Not Code
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Position Panels Using CSS

          Position Panels Using CSS

          A panel is a useful layout tool that defines the logical divisions of your page. Using CSS, you can position panels and improve the layout of the page.

          Required Editions

          Available in: Salesforce Classic

          Available for purchase in: Enterprise, Performance, and Unlimited Editions

          Available (with limitations) in: Developer Edition

          User Permissions Needed
          To build, edit, and manage Site.com sites:

          Site.com Publisher User field enabled on the user detail page

          AND

          Site administrator or designer role assigned at the site level

          Adding Padding and Margins to Panels

          Two CSS properties—margins and padding—can help with your page layout by creating space between the rows and columns, and the content within. The margin property controls the space outside the panel between its border and outer edge, while the padding property controls the space between the panel's content and border.

          To add margins and padding:

          1. Select the panel.
          2. Open the Dimensions section of the Style pane.
          3. In the Margins section, either:
            • Set the margin width for all four sides by entering a value in the All text box and selecting the unit of measurement.
            • Set the margin widths for the top, right, bottom, or left sides independently by entering a value in the appropriate text box and selecting the unit of measurement.
          4. Similarly, in the Padding section, set the padding widths as required. Adding padding increases the total width of the panel. For example, if you have a panel with a width of 500px and you add padding of 20px to all sides, the total width of the panel will be 540px.
          Tip
          Tip You can center a panel or block page element using the margin property. Enter 0 in the All text box and select Auto in the drop-down list.

          Creating Column Panels Using the Float Property

          If you need to add more divisions to the page and you're not familiar with CSS, the easiest method is to use row and column panels. Alternatively, using the CSS float property, you can position panels to the left or right to create columns. (When you add panels using the row and column panels feature, they're automatically positioned using the float property.) For example, you could add two single panels to a container panel and set both panel's float and width properties to create a two-column page layout.

          To create a column panel:

          1. Select the panel.
          2. Open the Layout section of the Style pane.
          3. Click Float left to float the panel to the left, or click Float right to float the panel to the right. If you're creating a two-column layout, for example, ensure you set the float property of both panels.
          4. Adjust the width of the panel to ensure the panels align correctly by either setting the width in the Dimensions section or dragging the panel's border on the page. For example, if you're creating two columns of equal width, set the width of both panels to 50%.
          Tip
          Tip When you use the float property, remember to set the overflow property of the container panel to “hidden.” This allows the container panel to grow as the height of the column panels increase. Select the container panel and in the Layout section of the Style pane, select Hidden in the Overflow drop-down list.
           
          Loading
          Salesforce Help | Article