Centering everything on a page with PHP (or HTML)

I have several images on a webpage and want to use a single command to force
all the images and text to be centred on the page. Is this possible?
Thanks a lot.

Gerry M
Gerry [ Fr, 02 Februar 2007 11:57 ] [ ID #1616819 ]

Re: Centering everything on a page with PHP (or HTML)

Gerry schreef:
> I have several images on a webpage and want to use a single command to force
> all the images and text to be centred on the page. Is this possible?
> Thanks a lot.
>
> Gerry M

Use css for the styles (google if you dont know how)

Then create the button
<a href = "thispage.php?style=center">click here to center</a>

and thephp code
$style = isset($_GET['style'])?$_GET['style']:'default';

echo '<div class="'.$style.'">your text</div>";
echo '<img class="'.$style.'" src="image.gif"/>";

etc

--
Arjen
http://www.hondenpage.com - Mijn site over honden
Dave Williams [ Fr, 02 Februar 2007 12:10 ] [ ID #1616820 ]
PHP » alt.php » Centering everything on a page with PHP (or HTML)

Vorheriges Thema: filesize() not reading http pages
Nächstes Thema: SourceGuardian php DEcoder