473,395 Members | 1,456 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Position of image or div tags

I would like to know how I can be able to know the position of an
image or a div tag. My aim is to put layers in any position I want to,
relative to an image or a div tag. For example If I have the following
code
<div id=layer1>
item1<br>
item2<br>
item3<br>
</div>

<div id=layer2>
item4<br>
item5<br>
</div>

I would like to place layer2 on the left of item2 in layer1. How would
I know the position of item2?

Thank you
John.
Jul 20 '05 #1
2 5957
On 27 Apr 2004 15:47:26 -0700, jo******@fastermail.com (John) wrote:
I would like to know how I can be able to know the position of an
image or a div tag.
Tags don't have "positions" as a property connected to them. As used in
a markup language they only mark the beginning and the end of elements
with possible content written between the start tag and the end tag.
My aim is to put layers in any position I want to...
Oh...Promise that if you ever find out how to do that "any position I
want to" thingy on the www, please report back here because just about
all of us wants to know how to do the same :-)
For example If I have the following code
<div id=layer1>
item1<br>
item2<br>
item3<br>
</div>
<div id=layer2>
item4<br>
item5<br>
</div> I would like to place layer2 on the left of item2 in layer1.
How would I know the position of item2?


You have started to dig a hole in the wrong place; before you go any
deeper, stop digging and revert to give us all an idea of what it is
that you _really_ want to achieve. Helpful hints /may/ be available but
we do need a better context from you to apply them to.

--
Rex
Jul 20 '05 #2
John, I used coordinates like you want in my website (http://www.raymondloman.nl)
The leftmost frame uses JavaScript and CSS to emulate a movie (works
correctly using IE). Probably you can benefit from the source code.
(you can set the style.properties as I read them).

Raymond Loman
e: ra*****@raymondloman.nl
i: http://www.raymondloman.nl

jo******@fastermail.com (John) wrote in message news:<1a**************************@posting.google. com>...
I would like to know how I can be able to know the position of an
image or a div tag. My aim is to put layers in any position I want to,
relative to an image or a div tag. For example If I have the following
code
<div id=layer1>
item1<br>
item2<br>
item3<br>
</div>

<div id=layer2>
item4<br>
item5<br>
</div>

I would like to place layer2 on the left of item2 in layer1. How would
I know the position of item2?

Thank you
John.

Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Matthias | last post by:
Hello, I have a Canvas-Widget and will use as a "array of pixel". At Positon x,y I print a rectangle with a special color. I give the rectangle no objectname. Then I will ask the...
1
by: Lam | last post by:
hi i have a problem with position of image i use this code in a "alert" function : document.getElementById("lienx").offsetLeft + " , " + document.getElementById("lienx").offsetTop with : ...
7
by: John | last post by:
I would like to know how I can be able to know the position of an image or a div tag. My aim is to to put layers in any position I want to, relative to an image or a div tag. For example If I have...
4
by: Jay | last post by:
Hi, How can I capture mouse position on Image? I found number of script capturing mouse position of the page. But I could not find anything based on image. What I want to find out is X Y...
0
by: Robert Seidl | last post by:
I saw that VB .Net 2003 has some tools for easily reading metadata information present in some TIFF and JPG files, eg. ---------------------------------------------------------------- .... Dim b...
8
by: handersonVA | last post by:
Hello, I'd like to put small images around a big image, so when a small image is clicked, that image is shown as a big image in the center. how should I do that? I will use a table tag to organize...
14
by: Schraalhans Keukenmeester | last post by:
I am building a default sheet for my linux-related pages. Since many linux users still rely on/prefer viewing textmode and unstyled content I try to stick to the correct html tags to pertain good...
1
by: tomorobi | last post by:
I have the following Javascript function on a page: function makeBold(target) { document.getElementById(target).focus();...
4
by: HoangTuanSu | last post by:
I have just got a javascript code from my friend. I've modified it for my purpose but a problem happens. First, here's my code html <body> <table align="center" width="60%" height="100%"...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.