HTML/CSS IE using position:fixed

I am trying to use position:fixed in IE9 it does not work, it works under chrome,
I need a way around it.

Who is Participating?
Ahmed HusseinConnect With a Mentor Commented:
If you use XHTML instead of HTML then position:fixed is definitely work. On starting of your HTML page you have to add

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "">

OR <!doctype html> in first line on page
For IE, you need to specify !DOCTYPE for position:fixed to work properly.
Hi there  amiDgreat ,

<!doctype html>
<html lang="en">
  <meta charset="utf-8">

as the first 4 lines (the doctype prevents it going into quirks mode).

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.