Results 1 to 3 of 3

Thread: CSS pos absolute issue in FF and IE

  1. #1
    Join Date
    Apr 2006
    Posts
    30
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default CSS pos absolute issue in FF and IE

    Okay, this is interesting. I am trying to place an image on an image using z-index and the position property. I have it rendering in IE just fine, but FF is off by exactly 6px. Here is my CSS:

    Code:
     <td width="81" height="100">
    <div style="position:absolute; z-index:1; top: 346px;"><img src="images/legend/c1/c1-1.jpg" name="myImageC1" width="81" height="133" id="myImageC1">
                        <div style="position:absolute; z-index:10; left: 9px; top: 24px;"><img src="images/legend/c2/c2-1.jpg" name="myImageC2" width="65" height="83" id="myImageC2"></div>
                  </div>
    </td>
    If I change top:346px of z-index:1 to top:340px it renders fine in FF but not in IE. I'm sure there is a very simple solution to this, however I have not been able to find it.

    Here is the link to show the problem


    Please, any advice would be much appreciated.

    THANKS!

  2. #2
    Join Date
    Feb 2007
    Location
    🌎
    Posts
    528
    Thanks
    10
    Thanked 10 Times in 10 Posts
    Blog Entries
    2

    Default

    Assign the styles within a browser sniffer JavaScript.
    ....(o_ Penguins
    .---/(o_- techno_racing
    +(---//\-' in
    .+(_)--(_)' The McMurdo 500

  3. #3
    Join Date
    Dec 2004
    Location
    UK
    Posts
    2,358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by dude9er View Post
    Okay, this is interesting. I am trying to place an image on an image using z-index and the position property. I have it rendering in IE just fine, but FF is off by exactly 6px.
    Your document is rendering under "Quirks" mode, and you are using a table-based layout. Neither are a good idea, and both can conspire to create rendering problems.

    Quote Originally Posted by techno_race View Post
    Assign the styles within a browser sniffer JavaScript.
    Please do not recommend something like that to anyone ever again.
    Mike

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •