PDA

View Full Version : Absolute positioning


rah111
07-01-2002, 01:39 AM
Hi all.

I have used style=position:absolute to place an image precisely where I want to on the screen, thanks to some help obtained from this forum last week.

Is it possible to do the same with straight text?

I have placed a table on a page and immediately after the </table> tag I just put some text "This is a text placement test".

I've tried to use variations of <style=...> to position the text next to the first table element at the top of the document, but nothing seems to work. Does absolute positioning only work for objects?

The code is:

<html>
<body>
<table>
<tr><td>Item 1</td></tr>
<tr><td>Item 2</td></tr>
etc
<tr></tr>Item x</td></tr>
</table>
This is a text placement test.
</body>
</html>

which produces:

Item 1
Item 2
etc
Item x
This is a text placement test.

whereas I want:

Item 1 This is a text placement test
Item 2
etc
Item x

Is this possible, and if so, how?

Thanks in advance.

Russell.

ACJavascript
07-01-2002, 02:49 AM
you have to place the text within a div tag.

Like so: <div style="position:absolute;top:0;left:10;">this is a test Text</div>