February 17, 2013

Position fixed in Internet Explorer 7

As I know some of you are facing position fixed is not working properly in IE7. I would like to share the solution, hope it can help you.

In order to make the element position fixed work properly in IE7, DOCTYPE should be defined at the beginning of the HTML code. If you missed the DOCTYPE, position fixed cannot work properly in IE7.

Here is the code:


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

No comments:

Post a Comment