Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


position fixed does not work in IE

Posted on 2005-03-25
Medium Priority
Last Modified: 2008-03-04
Hello Experts,

<style type="text/css">
.box1 {
position: fixed;
left: 1em;
top: 1em;
border: 3px solid black;
padding: .5em;
width: 8em;
text-align: center;
font-weight: bold;
font-size: large;
background: red;
color: white}

<div class="box1">This is a box positioned at a fixed position and should not scroll</div>
Question by:pinaldave
  • 2
LVL 30

Accepted Solution

GrandSchtroumpf earned 1800 total points
ID: 13632122
The title of your question is the answer:
Position fixed does not work in IE.

It's just not supported by IE.

Assisted Solution

trevorhartman earned 200 total points
ID: 13632179
you can mimick fixed position using javascript. it's a little choppy but it works.  let me know if you want code/links
LVL 21

Author Comment

ID: 13632228
Thank you Grand.
I did not know that.
Trevorhart.. .thanks for answer.
Actually I am preparing the CSS tutorial so I will mentioned this as a drawback. I will not need the javascript for today. Thank you for offer.
LVL 30

Expert Comment

ID: 13632389
You don't always need javascript to mimic it in IE.
It can be done with css only in some cases.  The result is not that bad, but it's very ugggggly code that is likely to break, so it should be avoided:  http://www.serger.biz/ee/FixedMenu/FixedMenu.html

And using javascript should definitely be avoided.

The best thing is to use "position:fixed" and use a workable non-fixed alternate solution for bad browsers.
You can always have a little message that tells your visitors to use a good browser if they want to enjoy the site's complete functionality.

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Creating a CSS block that only applies to printing By default, all of your CSS applies to every possible view of your page - whether on screen, printed, landscape, touch-screen, or whatever.  You can, however, add CSS that only applies under certai…
Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
In this Micro Tutorial users will learn how to embed custom fonts into websites using @font-face in CSS Select a font: Ensure the EULA allows you to use @font-face: Download the font: Get the browser-compatible files you need: Edit your CSS       - Name …
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
Suggested Courses
Course of the Month11 days, 20 hours left to enroll

564 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question