|
Posted by Jonathan N. Little on 11/14/07 18:34
Herbert Meister wrote:
> Bone Ur wrote:
>>
>> Put the image in a relatively-positioned <div> inside the cell and put
>> an absolutely-positioned button within that.
>
> That's what I thought. But it seems that the relative position doesn't
> work.
>
> <div id="main2" style="position:relative; top:22; left:22; width:100;
> height:100; border:1 solid blue; background-color:green; overflow:
> visible; visibility: visible; z-index: 2; clip: rect(2,244,244,2);">
>
> <img src="test.jpg" alt="tset" width="50" height="49" />
>
> </div>
>
You put the "position: relative" on the parent of the "position:
absolute" to get the absolutely position element to be relative to
parent and not the page... also with css properties lengths need units[*]
<!-- are you really using XHTML? -->
<div id="main2" style="position:relative; width: 100px; height: 100px;
border:1px solid blue; background-color: green;">
<img src="test.jpg" alt="tset" width="50" height="49" style="position:
absolute; top: 22px; left: 22px; " />
</div>
--
Take care,
Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
Navigation:
[Reply to this message]
|