references:joomla.framework:document:jdocument-addstyledeclarationTable of Contents
addStyleDeclaration
Adds a stylesheet declaration to the page. Syntaxvoid addStyleDeclaration ( $content, $type )
ExamplesThis example adds a style declaration to the page. Example 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: Result <style type="text/css"> <!-- body { margin: 0px 0px 0px 0px; height: 100%; font-size: 76%; } --> </style> |


