IE8 and absolute position

Discussion in 'HTML & Website Design' started by venkata_kesava, Oct 28, 2009.

  1. #1
    Hello EveryOne,

    Currently i am supporting IE6 and IE7 for my webSite. Now i am trying to support IE8. I am facing some strange problem with IE8 especially with the position:absolute.

    Is the position is absolute and if any padding or border is presented for the DIV or P then IE8 has not consider the padding and border. Can any one help me how to solve this problem..

    PS:If i change the IE8 browser to compatableView then it can work fine.
     
    venkata_kesava, Oct 28, 2009 IP
  2. tercede

    tercede Well-Known Member

    Messages:
    387
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    135
    #2
    Live example?
     
    tercede, Oct 28, 2009 IP
  3. venkata_kesava

    venkata_kesava Peon

    Messages:
    20
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    My site is intranet.. so it is not accesable from internet.. i will prepare one sample and post it here
     
    venkata_kesava, Oct 28, 2009 IP
  4. Fez

    Fez Member

    Messages:
    66
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    43
    #4
    you can embed this code into your header to tell IE8 to load your website like IE7 without having to turn on compatibility view.
    
    if (strpos($_SERVER['HTTP_USER_AGENT'],"MSIE 8")) {header("X-UA-Compatible: IE=7");}
    
    
    if (strpos($_SERVER['HTTP_USER_AGENT'],"MSIE 8")) {header("X-UA-Compatible: IE=EmulateIE7");}
    
    Code (markup):
    check here as reference: http://blogs.msdn.com/ie/archive/2008/06/10/introducing-ie-emulateie7.aspx
     
    Fez, Oct 28, 2009 IP
  5. forextrendalerts

    forextrendalerts Guest

    Messages:
    132
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Hi, What I am going to do is turn the banner into a single image so I don't have to deal with the absolute positioning. I will let you know how that goes....
     
    forextrendalerts, Oct 29, 2009 IP
  6. venkata_kesava

    venkata_kesava Peon

    Messages:
    20
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Hi.. Thanks for the reply... Is there any way to do it through JavaScript??
     
    venkata_kesava, Oct 29, 2009 IP
  7. drhowarddrfine

    drhowarddrfine Peon

    Messages:
    5,428
    Likes Received:
    95
    Best Answers:
    7
    Trophy Points:
    0
    #7
    IE8 has finally gotten their CSS support closer to the more modern browsers (anything that's not IE). So IE8 acts more like the modern browsers. You don't want to "fix" IE8 markup because that's more likely written correctly while the stuff you have working in the worse browsers is actually wrong.

    So get this working in a proper browser (anything but IE), then use conditional comments to hack the page to force it to work in IE7/6. Otherwise, you will forever have such problems.
     
    drhowarddrfine, Oct 29, 2009 IP
  8. pizzazz

    pizzazz Peon

    Messages:
    16
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #8
    You "may" be suffering from the IE6 double margin bug. As was mentioned before, IE8 is nearer to valid CSS than IE6 or IE7 ever were, try and reverse your workflow and decelop in IE8 first and provide "fixes" if needed for IE6/7

    Regarding the double margin bug - Try putting “display:inline;” in the css of the offending Div.

    Regards
     
    pizzazz, Oct 30, 2009 IP