Assets
CSS

Sun CSS Basics

The Sun CSS defines how html looks for Sun's web sites. From basic styles like font face and size to specifc styles intended for tabs or page titles. Each Sun page refers to the CSS in the HEAD section of the html page which is part of the A0 document top component. If a site does not reside on sun.com the css must be loaded on that site, or the sun.com css must be referenced in order for the css to work.

The Sun CSS consist of several files, these files must NOT be combined into one file. If you have a large site that references a local copy of the Sun css and that requires additional style you shoud use a seperate .css file and reference it in the default.css file using the @import command. If your pages reference a shared copy of the Sun css that you do not have access to you can use the @import command inside a STYLE tag to referecence an additional style sheet. Other CSS files such as the default_developer.css and media-shell.css are included in the /css directory and they are used only when need.

Addition style sheets may NOT define font face or redefine default font sizes.

Everything needed to build pages to the Sun's specification is included in the CSS. However, at times you will need to create some specific styles for your content. The best way to do this is by adding the style INLINE. Inline styles use the style attribute in any tag in order to define a style.

For example, to make green text...
<span style="color:#33CC33">this is green text</span>
this is green text

Using inline styles to define text color, div padding, or paragraph margins is allowed however inline styles are NOT to be used to define specific font faces or sizes. Font sizes are defined in a complex way on sun.com and the Sun CSS will not allow for inline styles that define sizes. To make text of different sizes use one of the following classes from the Sun CSS.

<span class="small">this is small text</span>
this is small text
<span class="big">this is big text</span>
this is big text
<span class="xbig">this is xbig text</span>
this is xbig text
<span class="xxbig">this is xxbig text</span>
this is xxbig text

Inline styles must not conflict or mimic existing classes in the CSS. If you are unsure if your custom styles can cause potential problems with your CSS please contact webdesign@sun.com for assistance.

Back to top


Download CSS

The CSS can be requested as part of the Global Assests Request download package.

Back to top

Contact About Sun News & Events Employment Site Map Privacy Terms of Use Trademarks Copyright 1994-2006 Sun Microsystems, Inc.