====== addStyleDeclaration ====== {#JAPI Joomla.Framework Document JDocument::addStyleDeclaration #} Adds a stylesheet declaration to the page. ===== Syntax ===== void addStyleDeclaration ( **$content**, **$type** ) | **$content** | string | is a string containing the style declarations. | | **$type** | string | is a string containing the type of style. This parameter is optional and if omitted defaults to 'text/css'. | ===== Examples ===== This example adds a style declaration to the page. global $mainframe; $style = "body {" . "\n margin: 0px 0px 0px 0px;" . "\n height: 100%;" . "\n font-size: 76%;" . "\n}"; $document = &JFactory::getDocument(); $document->addStyleDeclaration( $style ); Might add the following code to the head block of the current page: