HTML_CSS : The Definitive Guide
|
HTML_CSS::createGroup() creates basically a group for selectors given as first argument. You can identify this group by an identifier (alphanumeric) or let HTML_CSS manage an internal numeric identifier itself.
Let creates this group of selectors :
#main p, #main ul { padding-top: 1em; color: red; }
Identifier is named myGroupID in this example:
<?php
require_once 'HTML/CSS.php';
$css = new HTML_CSS();
$g1 = $css->createGroup('#main p, #main ul', 'myGroupID');
$css->setGroupStyle($g1, 'padding-top', '1em');
$css->setGroupStyle($g1, 'color', 'red');
$css->display();
?>
| HTML_CSS : The Definitive Guide | v 1.0.0 : June 24, 2006 |