You are here: Re: Placing an object on top of a picture « HTML « IT news, forums, messages
Re: Placing an object on top of a picture

Posted by Ben C on 06/06/07 09:03

On 2007-06-06, Harry Bellafonte <goodminded@hotmail.com> wrote:
> Hi
>
> Which html tag can I use to place another object ( picture or text) on
> top of another picture?
> I know I can use div, but then I can only place the object in the
> center, left or right. And I want to place the object at a certain
> position on the picture.
>
> Any help will be appreciated.

Use position: absolute. Something like this:

<div style="position: relative">
<img src="foo.png" style="display: block">
<div id="otherObject" style="position: absolute; top: 14px; left:
32px">...</div>
</div>

The outer div is made position: relative so it becomes the "containing
block" for the absolutely positioned one, i.e. the block from which
"top: 14px; left: 32px" is measured.

 

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

Π‘Π°ΠΉΡ‚ ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ Π² Π‘Ρ‚ΡƒΠ΄ΠΈΠΈ Π’Π°Π»Π΅Π½Ρ‚ΠΈΠ½Π° ΠŸΠ΅Ρ‚Ρ€ΡƒΡ‡Π΅ΠΊΠ°
ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ΠΈΠ΅ ΠΈ ΠΏΠΎΠ΄Π΄Π΅Ρ€ΠΆΠΊΠ° Π²Π΅Π±-сайтов, Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚ΠΊΠ° ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΠ½ΠΎΠ³ΠΎ обСспСчСния, поисковая оптимизация