WhoCares357
2008-03-31 19:03:22
I'm trying to use a div tag to center an image and put text on top of it. But I don't know how to place the text over the image. Anyone have any ideas? Kinda new to this.
1337.
2008-04-05 14:49:42
Off the top of my head you should be able to do something like:
<p>
<span style="background:url('image.gif');" />
Text over Image
</p>
NiCbaZ
2008-04-05 23:58:09
are you useing dream weaver? if you are set the image as the backgroud to the table and just type over it.
Dumpin
2008-04-06 04:41:01
It's correct what L33t is saying.. this is a part of my photoshop layout:
<td colspan="9" rowspan="7" valign="top"
background="images/index_22.gif">
<p>
<?php
$menu = $_GET['menu'];
$name = $_GET['name'];
//$info = $menu ."/" . $name . ".txt";
$info = "./" . $menu . "/" . $name . ".txt";
$content = @file_get_contents($info);
if(empty($content) || empty($name)){
$content = @file_get_contents('1/Home');
}
echo $content;
?>
</p>
</td>
Edit: the red is php which doesn't have to bother you
WhoCares357
2008-04-06 08:58:03
Thanks guys. Gonna go try it out.
PS I am using Dreamweaver.
Jagex_Fagex
2008-04-28 02:52:08
editing the code, you should be able to add a background property to the div tag:
<div background="location/file.gif>
kinda thing.. then in the div itself have the text. Although i don't know much about the div tag. You can use it in the table tag. so try it out.
Daniel
2008-05-02 02:23:37
Are you sure he wants the image a background?
NiCbaZ
2008-05-03 00:01:01
if you want text on it thats the only was in dream weaver
Jagex_Fagex
2008-05-18 01:11:38
http://www.tizag.com/cssT/layers.phpalso try there. you can do it with CSS
WhoCares357
2008-05-18 21:32:35
I was looking this over for a while now and I think that the best way is to use a table (divide the banner, buttons, etc).
hylian_loach
2008-05-19 05:55:19
1337's method is the best way - use CSS to create a background image within an element and position the text over the element.
1337.
2008-06-11 17:10:38
Yeah, tables are very outdated for that sort of thing (due to accessibility reasons). Try to pick up a bit of css and find a workaround with div's/span's ;)