PDA

View Full Version : Positioning Problem


IKLOP
10-29-2003, 01:17 AM
I'm trying to integrate a poll feature into my website. To make space where I want the poll to go, I have created a 1x1 transparent gif. I then have an image tag that stretches the gif to whatever height and width I want the poll space to be. Then I add the parameter align='right' so that the text will wrap around this image. This works pretty well to get the text out of the way for the poll. I realize I could do this by having a table and dealing with colspan, but by doing the image method the text will seemlessly wrap around the poll/image and not create any weird spaces.

The dilema comes in that I can't figure out how to get the poll text over that image. I've tried using css, the only way I think it can be done, but either I don't know the exact position of the text because the whole page is centered, or the poll text just pushes the rest of the text out of the way. I can't figure out a way to get the text right over the image, no matter the size of the browser and all that other stuff.

If you want to see how the image thing works, you can see the original site here (http://www.iklopstudios.com) and the site with the image here. (http://www.iklopstudios.com/index2.php)

Thanks in advanced

jaeman
10-29-2003, 07:24 AM
You wont be able to get the text over your image if you are using the <img> tag, It just isn't possible.

What you need is to have the image as "background" that way you will be able to have text over the top of it.

<table BORDER COLS=2 WIDTH="100%">
<tr>
<td BACKGROUND="image.jpg">Cell1</td>
<td>Cell2</td>
</tr>
</table>

Note that you will have to play around with spaces in the cell to show the images correct size as background only shows the amount of the image that the text is filling in that cell... jaeman;)

IKLOP
10-29-2003, 08:22 PM
In case anyone's wondering, I figured out how to do this using css float:right. This does basically the same thing that align='right' does for an img, but it can be done with text, and can add a pretty cool look to your site IMO.