Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7
  1. #1
    Regular Coder boogily's Avatar
    Join Date
    Jul 2009
    Posts
    275
    Thanks
    18
    Thanked 4 Times in 4 Posts

    Top margin IE7 error

    I am working on a site, and an absolute positioned element seems to behave weird only in IE7. There is a ribbon that is in the upper right hand corner that says "resource center" with a plus sign by it.

    In all other browsers it is positioned lower, so it covers up most of the top header, which is the way it is supposed to be. How can I fix it so that it's vertical position isn't so high?

    http://rocket55clients.com/koch/inde...&id=1&Itemid=2
    Joomla Development Company and MN SEO
    "Joomla development from design to SEO"

  • #2
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,675
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Hello boogily,
    Some versions of IE don't seem to do negative margins very well. Since that graphic's container is absolutely positioned, why not use top: -26px; in place of the negative margin?
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • #3
    Regular Coder boogily's Avatar
    Join Date
    Jul 2009
    Posts
    275
    Thanks
    18
    Thanked 4 Times in 4 Posts
    Switched to negative top, still does it
    Joomla Development Company and MN SEO
    "Joomla development from design to SEO"

  • #4
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,675
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    IE is so odd about this kind of thing. Could be you need to specify height/width of that element? Height at least -
    <div style="position: absolute; right: 20px; top: -26px; height: 60px;">


    Why the inline styles? Also, it's just an anchor with an image so it hardly needs to be in it's own div. It doesn't make sense to be nested in paragraph tags either...
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • #5
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,675
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    One more thing, your unnamed inline styled <div style="width:1001px; margin:0 auto; position:relative;"> only encloses the graphic your trying to put negative position on?

    That graphic should be position off a relative container of the whole site, or the #header... probably not some random div sitting at the top of the site doing nothing.
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • Users who have thanked Excavator for this post:

    boogily (02-14-2011)

  • #6
    Regular Coder boogily's Avatar
    Join Date
    Jul 2009
    Posts
    275
    Thanks
    18
    Thanked 4 Times in 4 Posts
    Thanks. I so overthought this. I just made it relative to the header. Thats it. Thanks@!
    Joomla Development Company and MN SEO
    "Joomla development from design to SEO"

  • #7
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,675
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Quote Originally Posted by boogily View Post
    Thanks. I so overthought this. I just made it relative to the header. Thats it. Thanks@!
    Right on, glad you got it going
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad


  •  

    Posting Permissions

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