Results 1 to 8 of 8

Hybrid View

  1. #1
    Join Date
    Jun 2007
    Posts
    239
    Plugin Contributions
    0

    Default css absolute positioning IE and firefox problem

    I am trying to use absolute positioning to place some of my images on my homepage. The image is placed where I want in firefox but not in IE 7. What is the best method to do this so that it is compatible on both browsers?

    Thanks

  2. #2
    Join Date
    Nov 2003
    Posts
    1,987
    Plugin Contributions
    15

    Default Re: css absolute positioning IE and firefox problem

    Without a link to an example of the problem I doubt if anyone can help you with this.

    I know IE (<=6 for sure, not sure about IE7) and FF handle absolute positioning from within table cells differently, but I am sure there are more differences.

  3. #3
    Join Date
    Jun 2007
    Posts
    239
    Plugin Contributions
    0

    Default Re: css absolute positioning IE and firefox problem

    Quote Originally Posted by paulm View Post
    Without a link to an example of the problem I doubt if anyone can help you with this.

    I know IE (<=6 for sure, not sure about IE7) and FF handle absolute positioning from within table cells differently, but I am sure there are more differences.
    Thanks for the reply!
    I had to remove it because it was not consistent. This is an example of the code I used:

    #image {position:abosolute;
    top:-21px;
    right: 300px;
    }

    This is just an example. It shows up correctly in Firefox but not in IE. Is there a hack that I can use to resolve this or do you know a resolution?

    Thanks!

  4. #4
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: css absolute positioning IE and firefox problem

    I ran into this when trying to position an element outside of its parent. Works fine in FF as it should, IE chokes (cuts off the overhang).
    I believe I solved it by applying an extra 23px of padding to the parent so I could give the one element a left: -23px; position. Obviously this will only work for a parent without border or background.

  5. #5
    Join Date
    Jun 2007
    Posts
    239
    Plugin Contributions
    0

    Default Re: css absolute positioning IE and firefox problem

    Quote Originally Posted by gjh42 View Post
    I ran into this when trying to position an element outside of its parent. Works fine in FF as it should, IE chokes (cuts off the overhang).
    I believe I solved it by applying an extra 23px of padding to the parent so I could give the one element a left: -23px; position. Obviously this will only work for a parent without border or background.
    Can you write an example code just for reference? i want an idea on how you did it.

    ThankS!

  6. #6
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: css absolute positioning IE and firefox problem

    This is what I did for the main collection titles on my homepage:
    Code:
    #headCel {
        position: absolute;
        top: 246px;
        left: 42%;
        padding-left: 21px;
        font-size: 1.3em;
        }
    
    h1 {
        margin-left: -21px; 
        margin-bottom: -18px;
        }
    The #headxxx is the overall title block, and each of them has an h1 in it. See my site for a visual.

 

 

Similar Threads

  1. CSS Positioning Problem in Safari and Chrome Only
    By limelites in forum General Questions
    Replies: 13
    Last Post: 25 May 2009, 03:40 PM
  2. Absolute Positioning of Login and Account Links in Header
    By bsteinagel in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 3 Mar 2009, 11:01 AM
  3. absolute positioning inconsistent in firefox and IE (TABS PRO)
    By james739 in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 11 Jul 2008, 03:22 PM
  4. Difference in CSS absolute positions in Firefox and IE
    By dvasdekis in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 12 Sep 2007, 03:55 AM

Posting Permissions

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