Welcome to WebmasterWorld Guest from

Forum Moderators: not2easy

Message Too Old, No Replies

Displaying differently in both IE & FF



11:19 pm on Aug 12, 2011 (gmt 0)

I'm simply trying to get the wire frame of my website working, then I can toss in all the images and content later.

Problem: What I am aiming for is to have the header in a static position at the top of the site so the only part of the site that scrolls is the content. In Firefox, this works like a gem. However in IE (I have IE 9 currently installed), this doesn't work. The header just scrolls with the rest of the site. I've tried to Google a fix for this, but I've come up empty-handed.

This is all my code (live version::

<link rel="stylesheet" type="text/css" href="style.css">

<!--[if IE]>
<link rel="stylesheet" type="text/css" href="ie.css">


<div id="masterHead">
header & nav stuff here.
<div id="masterBodyCont">
<div id="contentBox">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer rutrum aliquet mattis. Nullam vel accumsan lacus. Praesent in velit magna, dignissim ultrices turpis. In et consectetur mi. Vestibulum nibh ipsum, iaculis ut interdum non, congue sed odio. Aenean quis urna mauris. Fusce vel tristique dui. Mauris elementum volutpat eleifend. Aliquam fermentum, orci vitae euismod semper, augue risus varius est, vel posuere urna orci sit amet nunc. Proin tortor nibh, hendrerit vel scelerisque vitae, tincidunt vitae libero. Cras eget faucibus tellus.

Morbi lobortis lorem non ligula venenatis dictum. Fusce lacinia congue tellus, sed luctus felis molestie sit amet. Vestibulum sit amet mi nec ipsum aliquam rhoncus ut eget urna. Aliquam erat volutpat. Fusce sit amet turpis sem. Donec vehicula elementum mollis. Sed at libero metus. Pellentesque egestas cursus pulvinar. Nulla tincidunt, est non dictum hendrerit, libero nibh rhoncus mauris, at rutrum urna erat sit amet ipsum. Sed non neque mauris, nec gravida lectus. Nunc cursus tempus mi id volutpat. Quisque a quam eget neque luctus venenatis. Etiam vestibulum nunc eu ante hendrerit ultrices. Aliquam erat volutpat. Curabitur et lectus vitae neque placerat tempor vel et arcu. Aenean vitae urna erat, eget laoreet ante. In ultricies nisi non tellus convallis at auctor magna aliquet. Nulla nisi sem, faucibus nec semper et, vulputate non arcu. Fusce at sem vel sapien dignissim facilisis sed eu velit. Sed tempus viverra ante, eget aliquam lorem venenatis non.

>>>> I deleted most of the dummy text for the sake of this post. <<<<<


Please, if you have any ideas or suggestions, I'd love to hear them. I've been trying to figure this out for over an hour now and I'm about ready to start pulling my hair out.

[edited by: Spyce at 11:41 pm (utc) on Aug 12, 2011]

[edited by: alt131 at 6:43 am (utc) on Aug 13, 2011]
[edit reason] Thread Tidy [/edit]


11:28 pm on Aug 12, 2011 (gmt 0)

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

Start here: [validator.w3.org...]


12:05 am on Aug 13, 2011 (gmt 0)

Umm... thanks but not exactly the kind of advice I'm looking for. No CSS errors were found so that didn't help.

Does anybody else have any other advice/suggestions?


9:25 am on Aug 13, 2011 (gmt 0)

10+ Year Member


If you don't have a full doctype on your page then all versions of IE party like its 1999 :) and behave much like IE5. That means they don't understand anything new (and as such ie6 and under do not understand position:fixed in any mode) and in quirks mode (no doctype) then no version of IE will understand position:fixed (among many many other things).

Make sure you have a full and valid doctype and the fixed position will work in ie7+.

Use this doctype:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Untitled Document</title>



10:49 am on Aug 13, 2011 (gmt 0)

Gotta love internet explorer.. haha. It messes up the layout doing that, but that's ok. It's nothing a little CSS-lovin' can't fix! :-p Thanks for the info!

Featured Threads

Hot Threads This Week

Hot Threads This Month