positioning 2 elements at the same absolute position in a table cell

Hello

I don't know CSS very well so please excuse my ignorance. I have 2 elements which i want displayed at the same absolute position in a table cell. This is the css which doesn't work; the map is displayed outside the table cell at the right y position but to the far right of the screen, and the transparent gif is displayed at the right place i think
  <td style="border: solid 1px #cccccc;width: 680px;" >

   		                 <cc1:Map ID="Map1" runat="server"  Height="360px" Width="680px"  EnableSession="True"  EnableScroolWheelZoom="False" style="position: absolute; left: 0px; right: 0px;"/>
 
						<img id="transparent" src="http://www.golivetutor.com/download/spacer.gif" style="width: 680px; height: 360px;position: absolute; left: 0px; right: 0px; z-index:180;"/>
	
                </td>

Open in new window


I put both elements inside a div in the table cell which has relative positioning and that works ok but there is something else on the page which gets messed up by this (something built into the map which i can't control).

Is there another way to achieve the positioning i desire in the table cell?

thanks
andiejeAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

COBOLdinosaurCommented:
We need a link to the page.  There are any number of things that can mess up positioning, and we need to see the whole context to determine the right rule declarations to use.

Cd&
0
GaryCommented:
Remove the absolute positioning from the map and leave it for the image.
You only need it on the 1 element since the other will automatically be in position.
0
Chris StanyonWebDevCommented:
Add position:relative to the table cell, and be very careful about setting a left and a right position to 0 - it can only be one! You may also need to set the top position to 0:

<td style="border: solid 1px #cccccc;width: 680px;position:relative;" >
    <cc1:Map ID="Map1" runat="server"  Height="360px" Width="680px"  EnableSession="True"  EnableScroolWheelZoom="False" style="position: absolute; left: 0px; top:0px; "/>
    <img id="transparent" src="http://www.golivetutor.com/download/spacer.gif" style="width: 680px; height: 360px;position: absolute; left: 0px; top:0px; z-index:180;"/>
</td>

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
HTML

From novice to tech pro — start learning today.