|
htmlCenter
Object centering class | [Previous] [Main] [Next] |
| htmlCenter encapsulates the <CENTER></CENTER> tags. It is used to mark regions, such as text or tables, that will be centered horizontally on the display.
| |
|
| |
| Some objects include an optional Align() method that specifies the alignment of an object. However, htmlCenter lets you easily center a block of
| |
| content without having to specify the alignment of each object. It also lets you center elements, such as images, and arbitrary content that could not otherwise be centered (such as entire tables). The Align() method of an object overrides htmlCenter.
| |
|
| |
| #include <dcmicro/htmlpp/styles.h>
| |
|
| |
| |
|
| |
| Text Formatting Classes in the User's Guide
| |
|
| |
| None.
| |
|
| |
| htmlCenter()
| |
| Constructs an empty object.
| |
|
| |
| htmlCenter( const htmlObject& element )
| |
| Constructs an object, inserting element into it.
| |
|
| |
| htmlCenter( const String& text )
| |
| Constructs an object, inserting the string text into it.
| |
|
| |
| virtual ~htmlCenter()
| |
| Destroys the object.
| |
|
| |
|
| |
| #include <stdio.h>
| |
| #include <stdlib.h>
| |
| #include <dcmicro/htmlpp/htmlpp.h>
| |
|
| |
| int main( void )
| |
| {
| |
| htmlCgi server ;
| |
| htmlPage page( "html++ example application" ) ;
| |
|
| |
| page << "This text is "
| |
| << htmlBreak()
| |
| << htmlCenter( "centered." )
| |
| << htmlBreak() ;
| |
|
| |
| server << page ;
| |
| return 0 ;
| |
| }
| |
|
| |
|
| |
| Content-Type: text/html
| |
| <HTML>
| |
| <HEAD>
| |
| <TITLE>html++ example application</TITLE>
| |
| </HEAD>
| |
| <BODY>
| |
| This text is <BR>
| |
| <CENTER>centered.</CENTER>
| |
| <BR>
| |
| </BODY>
| |
| </HTML>
| |
|
| |
| |
