Entering CSS Code
September 25th, 2008

CSS code falls into one of three categories: global, internal or in-line. Global CSS code is kept in an external file and is commonly known as a stylesheet. Internal CSS is included on your page by using a <style> tag. In-line styling is included within an HTML element (or SiteSpinner object) using the style=”…” statement.

The hierarchy of the three categories effects how the CSS code is applied to the web page. First global CSS code is applied to the specified elements. If internal CSS code is used referencing those same elements, then the internal CSS codes overide the global codes. Then at the lowest level, if in-line code is used, it will override both global and internal CSS codes of specified element. Hence, the page’s style cascades from the highest to the lowest level.

SiteSpinner Pro and SiteSpinner v2.9+ has moved away from using the in-line style method and now uses the internal CSS method. There is a project-wide option to produce stylesheets which moves the internal CSS code into external files. These external stylesheets are generated on a page-by-page basis and not as a central, global stylesheet for your entire published project, thus some style codes common to all pages are repeated.

Both SiteSpinner Pro and SiteSpinner allow you to add CSS code to your project by using the a custom header (via the Page Editor→Header tab) or by using a code object with the new code placement setting of “in CSS”. If you use a custom header, the CSS code will be placed above the SiteSpinner generated CSS code. CSS code entered via a custom header must contain <style> tags. CSS code entered using a code object set to “in CSS” will be placed at the end of the SiteSpinner generated CSS. Since the code object CSS code is placed inside the generated CSS code, it must not use the <style> tags as this would cause an error (the generated CSS already has the <style> tags).

Pages: 1 2 3 4


Leave a Reply

Spam protection by WP Captcha-Free


February 5th, 2012