You are here: Re: Image over two table cells? « HTML « IT news, forums, messages
Re: Image over two table cells?

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация