Access Keys:
Skip to content (Access Key - 0)
Home (Access Key - 1)
All spaces... (Access Key - 3)
Log in (Access Key - 5)
Sign up (Access Key - 6)
Toggle Sidebar

CSS Tab


This tab is accessed from the Layout Manager in Theme Builder 3.0 and above.

The CSS tab allows you to define custom CSS for a layout and optionally disable the inclusion of various CSS resources to gain more control over the overall CSS used in the layout.

Style Sheets

There are three fully-editable style sheets within a layout:

  • Custom CSS – This CSS will be used for all browsers.
  • IE CSS – This CSS will only be included for Internet Explorer version 5.5 or above by default
  • Import CSS – This option allows you to import one or more external style sheets.

To edit one of the style sheets, click the associated button to display the CSS editor window:

You can quickly switch between the CSS resources by clicking the tabs shown at the top of the editor window.

Once you have finished making changes, click the "OK" button. If you want to discard changes, click the "Cancel" button.

Where are the "Use Default..." links for these CSS resources?

Changing the Internet Explorer version for the IE CSS

You can change which version of Internet Explorer the IE CSS will be used on by editing the "conditional if" setting above the "Edit IE CSS" button.

For more information on this feature, please see About Conditional Comments in the Microsoft Developer Network.

Importing External CSS Resources

If you have externally hosted CSS files you can use the Imports tab to import them in to a layout.

Normally this approach won't be required with Theme Builder 3 because you can use Layout Hierarchy to centrally define your CSS and then have child layouts automatically inherit that CSS and any subsequent changes.

What syntax should I use?

Imported CSS Resources are loaded before the Custom CSS and IE CSS. For more details, please see Style Sheets 3.x.

If you are using a Content Delivery Network (CDN) to host CSS files externally, please refer to the CDN documentation for information regarding best practice regarding importing of CSS files.

Options

There are several options which allow you to further customise which CSS resources are used by the layout. These options are intended for "power users" who need extreme levels of control in their quest for perfection.

Merge this layout's CSS with it's parent's

By default, a layout will inherit the CSS defined in it's parent layout. For more information on this process, see Layout Hierarchy and Style Sheet Inheritance.

There may be cases where you want to start from scratch, and not import the Custom, IE and Import CSS from the parent layout in which case you can disable this option.

Use panel CSS for this layout

The panel CSS is defined using the Panel Editor in the Layout Tab. It's a quick and easy way to set the majority of styles such as backgrounds, borders, text settings, etc.

If you want more control, we'd recommend simply enhancing the Panel CSS using the Custom CSS and IE CSS options because that allows you to still make the more macroscopic changes using the Panel Editor.

However, if you want ultimate control you can disable the Panel CSS resource completely with this option.

Tip: You can turn off this option and then restrict CSS editing privileges to prevent people from customising the CSS in your layout.

Use inbuilt CSS for this layout

Theme Builder has a small amount of "in-built" CSS which ensures that certain elements (such as access key hits, page trees, etc) display correctly.

If you want complete control over these items, you can turn off the inbuilt CSS with this option.

What's in the inbuilt CSS?

Use Atlassian CSS for this layout

As of Theme Builder 3.0, we have started to include Atlassian's master Confluence style sheet, known as "main-action.css". This contains all the core styles used by Confluence, including those for the page editor, the browse space screens, most bundled macros and more.

Because Atlassian make changes to this style sheet from one version of Confluence to the next, including it ensures you get the correct basic styles for your wiki regardless of which version of Confluence you are using.

However, because it contains so many styles it can sometimes get in the way of your own style sheets. Should the need arise, you can disable Atlassian's Confluence style sheet with this option (not recommended as you'll need to add quite a lot of Custom CSS to make up for the missing styles).

FAQ's

Where can I find a list of all CSS used by the theme?

Can I add CSS resources for specific versions of specific browsers?

How do I centrally define some CSS to use in multiple layouts?

How do I define CSS for a specific panel?

I'm trying to override an inbuilt style but it's not working...

I'm trying to define styles for elements with compound classes but it's not working in Internet Explorer - why?

Some of my CSS styles aren't taking effect - any other ideas?

What are the "Use Default..." links?

See Also

The following pages contain additional useful information relating to style sheets:

  • Style Sheet Inheritance - style sheet resources accessed from this tab use a different type of inheritance to the rest of the theme
  • Style Sheets 3.x - technical overview of the style sheets used in Theme Builder 3.x
  • Panel Classes and IDs - if you need to specify CSS that affects a specific panel, this lists the classes you can use to make your CSS more specific.
  • Style Sheets Overview - this shows how various CSS resources are included in the layout.
  • 70 CSS tips and tricks - this external guide has loads of useful CSS tips and tricks but be warned that not all of them will work in a dynamic application like Confluence.
Toggle Sidebar
Adaptavist Theme Builder Powered by Atlassian Confluence