473,394 Members | 1,703 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,394 software developers and data experts.

can u find pixel coords of elements given only html

Hi
I am trying to determine coordinates of something in a webpage.
All i have is a subset of html that i know exists in a given webpage.
Now i want to find that subsetHtml in the page and determine the exact
pixel coordinates for the elements that subsetHtml comprises.
I'm pretty sure i know how to get the pixel coords once i have the
elements.
The hard part is going from plain HTML to actual elements.
Any ideas
thx,
jojoba

Jul 5 '07 #1
1 2704
On Jul 5, 11:44 am, joj...@gmail.com wrote:
Hi
I am trying to determine coordinates of something in a webpage.
All i have is a subset of html that i know exists in a given webpage.
Now i want to find that subsetHtml in the page and determine the exact
pixel coordinates for the elements that subsetHtml comprises.
I'm pretty sure i know how to get the pixel coords once i have the
elements.
Cross-browser computation of pixel location of an element in a web
page is an unsolved problem, in general. It can be done in many
particular cases but it is usually not easy and needs to be tested in
many browsers. Why do you need to know the pixel location? Luckily, I
haven't run into a situation where I need the pixel location of an
element except in the really simple cases where the usual offsetParent
walk up the DOM works.
The hard part is going from plain HTML to actual elements.
If you post a small example then people can help better. Hopefully one
of the HTML elements of interest has a unique id attribute.

Peter

Jul 5 '07 #2

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

Similar topics

3
by: Bob Sanderson | last post by:
I have a number of pages containing tables. Most have background images which have a single pixel border. The tables themselves do not have borders. For various reasons, I have to create one...
0
by: R0bert Neville | last post by:
I created a simple template with common tags, which serves as a quick reference guide for my web development efforts. The web page renders great in Firefox, yet becomes a mess in IE. Please review...
1
by: R0bert Neville | last post by:
I created a simple template with common tags. It serves as a quick reference guide for my web development efforts. The web page renders great in Firefox, yet becomes a mess in IE. The HTML and CSS...
2
by: ted | last post by:
Hi, Was wondering if it's possible to find the left position of a table cell if the cell is created dynamically. I have a table with a single cell. When a button is clicked, I'd like to add...
8
by: brett | last post by:
How can I find the height and width of a webpage? Say I want to make sure someone's webpage is within an 800X600 viewing area. Width is the most important but if I can get width, I should also be...
0
by: Rick Slansky | last post by:
Hi: This should be a fairly simple page, which lines up the second row cell nicely in the lower right corner. It does in Netscape, but when I check the page in Explorer, that cell (the entire...
15
by: Thomas W | last post by:
How can I use python to find images that looks quite similar? Thought I'd scale the images down to 32x32 and convert it to use a standard palette of 256 colors then compare the result pixel for...
28
by: Alan Silver | last post by:
Hello, Here I am again with another "why does IE do that" question!! Please have a look at http://www.kidsinaction.org.uk/fd/homepage.html and see if you can work out why IE adds a one pixel...
1
by: ofiras | last post by:
In bitmap, how can I find the nearest pixel (pixel 1) to a specific pixel (pixel 2) that has different color from pixel 2? Or how can I find a pixel in a specific distance from pixel 2 (like a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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.