Hi All,
I am making cosmetic changes to a website but I am only able to change the CSS not the aspx. I want to move an image that is inside a cell in a table set into the page by about 100/100px back to 0/0px.
The tag has got a unique id I can get at it with however the table's id is not unique and setting a background image on the table from css affects other parts of the site. I've also tried setting a background image on the body however this page is a frameset where each frame references the same stylesheet. The result is that I get a background image in each frame.
A greatly simplified version of the html is as so:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>move image</title>
<style type="text/css">
#imgLogo {/*how can I move this to 0,0?*/}
</style>
</head>
<body>
<table style="margin-left:100px; margin-top:100px;">
<tr>
<td>
<img id="imgLogo" src="http://www.google.com/intl/en_ALL/images/logo.gif" alt="google" />
</td>
</tr>
</table>
</body>
</html>
Cheers,
Chris
EDIT
Thanks to everyone who said to use position absolute. This certainly fixed the example html but not the real problem. The reason was that one of the parent elements already had a position absolute set but no co-ordinates. Setting this elements left and top position did the trick.