5 Replies - 7879 Views - Last Post: 20 December 2011 - 11:53 PM

#1 arvindthakur   User is offline

  • D.I.C Head

Reputation: 5
  • View blog
  • Posts: 133
  • Joined: 07-June 11

position:relative not working in IE9

Posted 14 November 2011 - 03:58 AM

Hello Guys,

Well I am developing an html page in which we have a table having <thead> tag used for the header section.Now I want to fixed this header section always on top.Following is the css code which I am using.
thead tr { position:relative; 
                   top: expression(offsetParent.scrollTop); 
                 }


But it is only working in IE8.It is not working in IE9.
So how can we achieve the same in IE9?

Thanks in Advance!!!

This post has been edited by arvindthakur: 14 November 2011 - 11:30 PM


Is This A Good Question/Topic? 0
  • +

Replies To: position:relative not working in IE9

#2 Dormilich   User is offline

  • 痛覚残留
  • member icon

Reputation: 4278
  • View blog
  • Posts: 13,562
  • Joined: 08-June 10

Re: position:relative not working in IE9

Posted 14 November 2011 - 05:02 AM

doesn’t position: fixed work?
Was This Post Helpful? 0
  • +
  • -

#3 EnvXOwner   User is offline

  • D.I.C Lover
  • member icon

Reputation: 358
  • View blog
  • Posts: 2,319
  • Joined: 10-August 09

Re: position:relative not working in IE9

Posted 14 November 2011 - 06:32 AM

I've never heard of exp<b></b>ression(offsetParent.scrollTop); as being a value for any CSS property. If you want a section of your website to be fixed you need to use position: fixed; just as Dormilich said. If this is a header your may also want to set the top to 0 like so top: 0;. You can also set the z-index really high to have higher precedence (when displaying) on the webpage z-index: 999;.
Was This Post Helpful? 0
  • +
  • -

#4 Jstall   User is offline

  • Lurker
  • member icon

Reputation: 434
  • View blog
  • Posts: 1,042
  • Joined: 08-March 09

Re: position:relative not working in IE9

Posted 14 November 2011 - 07:31 AM

Hi,

While I haven't used CSS expressions before according to this documentation official support for dynamic properties ended with IE 8, so that may explain why it's not working in IE 9.
Was This Post Helpful? 0
  • +
  • -

#5 arvindthakur   User is offline

  • D.I.C Head

Reputation: 5
  • View blog
  • Posts: 133
  • Joined: 07-June 11

Re: position:relative not working in IE9

Posted 14 November 2011 - 10:30 PM

View PostDormilich, on 14 November 2011 - 05:02 AM, said:

doesn’t position: fixed work?


well position:fixed keeping the the header static but its loyout is not coming good.
Was This Post Helpful? 0
  • +
  • -

#6 arvindthakur   User is offline

  • D.I.C Head

Reputation: 5
  • View blog
  • Posts: 133
  • Joined: 07-June 11

Re: position:relative not working in IE9

Posted 20 December 2011 - 11:53 PM

hello all

thead tr { position:relative;
      top: expression(offsetParent.scrollTop);
        }

I am using this concept in two apps
one is running on windows platform and other on unix machine
on windows it is working good
but it's not working on unix
Is anybody knows how to accomplish this?
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1