Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Position image in exact X,Y spot in relation to table cell 5

Status
Not open for further replies.

TMac42

Programmer
Jul 24, 2000
83
US
I assume I can assign an ID to a table cell for part of this, but how do I use CSS to insert two images with each image having a different location based on the location (XY) of the table cell?
 
Rather, I would suggest you put the 2 images in as proper img elements... and then assign them classes (or IDs if that's you're thing). Using CSS you can set them to have absolute position and you can control their respective top and left positions. Of course you would style the parent container (in your case the TD) with relative position.

Does that help?

Cheers,
Jeff

[tt]Jeff's Page @ Code Couch
[/tt]

What is Javascript? FAQ216-6094
 
Thanks for the reply. The TD is actually a footer area, so it will always be in a different place depending on the amount of content on the page. That's why I was shooting for using it as the base and then having the other images be in position relative to the TD location.

Possible, I think...just not sure how. Thanks.
 
Great. Do you know of any links to resources/tutorials that describe how to do this? Thanks.
 
something like this...
Code:
<table>
  <tr>
   <td style="position:relative;"><img style="left:Xpx; top:Ypx; position:absolute;"></td>
  </tr>
</table>

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you.
 
You guys rock. I thought it was more complicated than that. THANKS.
 
*sigh*

You can lead a horse to water... but some horses need a hosepipe shoved down their throats before they'll drink.

Obviously the OP was more interested in having the solution written by someone else than they were in actually solving the problem themselves... or maybe they just didn't understand my CONCISE and COMPLETE description posted as the very first reply. Ah well.

Cheers,
Jeff

[tt]Jeff's Page @ Code Couch
[/tt]

What is Javascript? FAQ216-6094
 
Jeff, my sentiments exactly. I guess your solution was not concise enough, because OP could not use copy&paste to solve his problem.
 
Maybe you were expecting too much of the OP, we're not all as clever as you guys ;-)

And I'm sure the RSPCA would have something to say about your methods Jeff!

Everyone have a star on me :)


"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top