how to fix the location of png or any image in html (help)

Discussion in 'HTML & Website Design' started by Black Soul, Jun 24, 2011.

  1. #1
    <DIV style="POSITION: absolute; TOP: 500px; LEFT: 700px" ><A
    href="index.html"><IMG class=a alt="cleative portfolio"
    src="icon.png" width=172
    height=47></A></DIV>

    this is the code which is use to define the position of image.
    BUT when i zoom into the page or open my website from any other pc with bigger display, then the location of my image is different.

    Please help me what to do that the position of image remain same on all displays or if we zoom into page.

    any other class i need to define in my css ?
    or any script.
    A complete tutorial will be very helpful :)
     
    Black Soul, Jun 24, 2011 IP
  2. webxhtml

    webxhtml Peon

    Messages:
    25
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Hi show ur page. But my first guess is that u dont have position:relative in ur main container. Position:absolute is located in container with position relative, if there is no position relative then ur div located in boby.
    Sorry 4 my bad english )
     
    webxhtml, Jun 24, 2011 IP
  3. shiva0077

    shiva0077 Peon

    Messages:
    110
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    --[if lt IE 7]>
    3
    4 // Include the Unit PNG Fix script
    5 <script type="text/javascript" src="unitpngfix.js"></script>
    6
    7 // Returns to code for all browsers
    8 <![endif]-->

    this is the way by that we can fix the image
     
    shiva0077, Jun 24, 2011 IP
  4. webxhtml

    webxhtml Peon

    Messages:
    25
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    shiva0077 i think this script is for png transparency for ie6. And the problem there is in bad position of picture.
     
    webxhtml, Jun 24, 2011 IP
  5. karthimx

    karthimx Prominent Member

    Messages:
    4,959
    Likes Received:
    127
    Best Answers:
    2
    Trophy Points:
    340
    #5
    make the position: static;
     
    karthimx, Jun 24, 2011 IP
  6. BRUm

    BRUm Well-Known Member

    Messages:
    3,086
    Likes Received:
    61
    Best Answers:
    1
    Trophy Points:
    100
    #6
    BRUm, Jun 25, 2011 IP
  7. Black Soul

    Black Soul Active Member

    Messages:
    437
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    95
    #7
    using this I'm not able to change the location of image :/
     
    Last edited: Jun 25, 2011
    Black Soul, Jun 25, 2011 IP
  8. unknownpray

    unknownpray Active Member

    Messages:
    3,831
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    70
    #8
    // Include the Unit PNG Fix script
    <script type="text/javascript" src="unitpngfix.js"></script>
    // Returns to code for all browsers
    <![endif]-->

    this is code by that you can fix the image
     
    unknownpray, Jul 1, 2011 IP