position image problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Lam

    position image problem


    hi
    i have a problem with position of image

    i use this code in a "alert" function :

    document.getEle mentById("lienx ").offsetLe ft + " , " + document.getEle mentById("lienx ").offsetTo p

    with :

    document.write( "<style>.lienme nu { font-family: arial; font-size:1px; position: absolute; width:200px;vis ibility: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@ "))
  • Lasse Reichstein Nielsen

    #2
    Re: position image problem

    Lam <lam-no-spamm-thanks@nospam.o rg> writes:
    [color=blue]
    > i have a problem with position of image[/color]
    [color=blue]
    > i use this code in a "alert" function :
    >
    > document.getEle mentById("lienx ").offsetLe ft + " , " + document.getEle mentById("lienx ").offsetTo p[/color]

    Look correct
    [color=blue]
    > with :
    >
    > document.write( "<style>.lienme nu { font-family: arial; font-size:1px; position: absolute; width:200px;vis ibility:hidden; z-index:2; background-color:red;}</style>");[/color]

    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.

    [color=blue]
    > i have 2 differents results with IE and mozilla
    > Mozilla says 149,16 , IE says 162 ,0
    > any idea to help me ?[/color]

    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 - lrn@hotpop.com
    DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleD OM.html>
    'Faith without judgement merely degrades the spirit divine.'

    Comment

    Working...