You are here: irt.org | BBS | Re: Center text over an image using CSS? [This BBS is closed]
Posted by Jason Nugent on July 30, 1998 at 13:30:48:
In Reply to: Re: Center text over an image using CSS? posted by Martin Webb on July 29, 1998 at 06:57:34:
: : I received the following question on the CSS FAQ:
: : <question>
: : Is there any way to center text over an image using CSS?
: Try something like the following which works in CSS enabled browsers:
: <P>
: <DIV STYLE="position: absolute; width: 150; height: 20; text-align: center; vertical-align: middle;">This is the text</DIV>
: <IMG SRC="picture.gif" WIDTH="150" HEIGHT="20">
: </P>
You probably also want to add a background: transparent attribute to the STYLE definition to make sure the image shows through.
Jason
Follow-ups:
You are here: irt.org | BBS | Re: Center text over an image using CSS? [This BBS is closed]