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

position image problem

Lam

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 :

document.write("<style>.lienmenu { font-family: arial; font-size:1px; position: absolute; width:200px;visibility:hidden; z-index:2; background-color:red;}</style>");

i have 2 differents results with IE and mozilla
Mozilla says 149,16 , IE says 162 ,0
any idea to help me ?

thanks
--
(concatenate 'string "lam" (reverse "gro.ylimafxut@"))
Jul 20 '05 #1
1 3182
Lam <la*****************@nospam.org> writes:
i have a problem with position of image i use this code in a "alert" function :

document.getElementById("lienx").offsetLeft + " , " + document.getElementById("lienx").offsetTop
Look correct
with :

document.write("<style>.lienmenu { font-family: arial; font-size:1px; position: absolute; width:200px;visibility:hidden; z-index:2; background-color:red;}</style>");
Why use JS to write your style tag?
The type attribute is required on style tags:
<style type="text/css">
Font size of 1 pixel? Won't work in my browser, I have a minimum font size of
6px.

i have 2 differents results with IE and mozilla
Mozilla says 149,16 , IE says 162 ,0
any idea to help me ?


You forgot to say what the problem was. You just stated what you did
and what happens. A useful bug report needs a third thing: What you
expected/wanted to happen. Without that, it's impossible to fix the
problem, because we don't know what fixed would be.

Do you want them to say the same? Or do you want the element to be
positioned the same? (Then position it with the top/left properties!)

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 20 '05 #2

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

Similar topics

4
by: Ken Kast | last post by:
Here's my situation. I have a statically positioned table that has an image in a cell. I also have some layers, defined by absolute-positioned DIVs for some animation. Everything works until I...
4
by: boclair | last post by:
Is this a known problem with IE6? I have a provisional two column layout, the left menu column is positioned absolute. The contents column is positioned relative. The contents column has an...
1
by: travis_brooks | last post by:
greetings I had a javascript that was reliably telling me the position of an image on a page, and now its not. I was using the script to draw a bounding box that followed the mouse around over...
7
by: Doc | last post by:
I've read in a couple of different places including the archives of this forum that html doesn't allow you to precisely dictate the position of an image, but I found this command (again in the...
5
by: Roderik | last post by:
Hi, My logo images are positioned some more to the right in IE6 than in FF1.5. I like them to be as shown in FF1.5. Does anyone have a clue, why they are positioned differently in IE? Problem...
2
by: Dale | last post by:
This seems like it should be simple and I am pretty sure I've done similar things a hundred times before but I sure can't seem to get it right this time. I have a GridView with a column of text...
2
roula
by: roula | last post by:
Hi, I have this code of some divs, and I am trying to put a transparent image in div #transp to cover a certain area of the parent div #main (in order to make an image map of the background image...
5
by: DL | last post by:
Hi, My research on this NG hasn't produced a satisfactory answer. Here's what I want to do: move two div (s) (each has an image tag within) to another location on the same page. // no...
10
by: VividWeb | last post by:
Hi. I am relatively new to CSS and HTML but have a basic understanding of most things. One of my backgrounds is not positioning correctly in IE 7 or AOL. The background behind the content...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.