Source for file CSS_InHeader.php
Documentation is available at CSS_InHeader.php
/* vim: set expandtab tabstop=4 shiftwidth=4: */
// +----------------------------------------------------------------------+
// +----------------------------------------------------------------------+
// | Copyright (c) 1997 - 2004 The PHP Group |
// +----------------------------------------------------------------------+
// | This source file is subject to version 3.0 of the PHP license, |
// | that is bundled with this package in the file LICENSE, and is |
// | available at through the world-wide-web at |
// | http://www.php.net/license/3_0.txt. |
// | If you did not receive a copy of the PHP license and are unable to |
// | obtain it through the world-wide-web, please send a note to |
// | license@php.net so we can mail you a copy immediately. |
// +----------------------------------------------------------------------+
// | Author: Klaus Guenther <klaus@capitalfocus.org> |
// +----------------------------------------------------------------------+
// $Id: CSS_InHeader.php,v 1.5 2004/01/14 22:21:16 thesaur Exp $
require_once 'HTML/Page.php';
require_once 'HTML/CSS.php';
// define the various settings for <body>
$css->setStyle ('body', 'background-color', '#0c0c0c');
$css->setStyle ('body', 'color', '#ffffff');
$css->setStyle ('h1', 'text-align', 'center');
$css->setStyle ('h1', 'font', '16pt helvetica, arial, sans-serif');
$css->setStyle ('p', 'font', '12pt helvetica, arial, sans-serif');
// create a new HTML page
// it can be added as an object
$p->addStyleDeclaration ($css, 'text/css');
$p->setMetaData ("author", "My Name");
$p->addBodyContent ("<h1>headline</h1>");
$p->addBodyContent ("<p>some text</p>");
$p->addBodyContent ("<p>some more text</p>");
$p->addBodyContent ("<p>yet even more text</p>");
// output the finished product to the browser
// or output the finished product to a file
//$p->toFile('example.html');
Documentation generated on Mon, 11 Mar 2019 10:16:41 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|