Here are some screenshots. http://img.photobucket.com/albums/v236/stealthestars/ie_ss.jpg http://img.photobucket.com/albums/v236/stealthestars/ff_ss.jpg As you can see, the main content & sidebar contents seem to be shifted down in IE. I REALLY REALLY appreciate your help with this. I used to code websites all the time but I'm a beginner again so now I'm having some difficulties with css/divs. Thank you so much in advance. I don't know which part of the code is problematic, so I included most of it and I apologize for its length. <!-- body { font: 100% Verdana, Arial, Helvetica, sans-serif; background: #666666; margin: 0; /* it's good practice to zero the margin and padding of the body element to account for differing browser defaults */ padding: 0; text-align: center; /* this centers the container in IE 5* browsers. The text is then set to the left aligned default in the #container selector */ color: #000000; } .bird { height: 120px; width: 178px; position: absolute; margin-top:105px; margin-left:20px; clear: none; float: none; z-index: 100; } .twoColFixLtHdr #container { width: 774px; /* using 20px less than a full 800px width allows for browser chrome and avoids a horizontal scroll bar */ background: #FFFFFF; margin: 0 auto; /* the auto margins (in conjunction with a width) center the page */ border: 0px; text-align: left; /* this overrides the text-align: center on the body element. */ padding: 0 0 0 0; } .twoColFixLtHdr #container2 { width: 973px; /* using 20px less than a full 800px width allows for browser chrome and avoids a horizontal scroll bar */ height:212px; background: #FFFFFF; padding: 0 0 0 0; margin: 0 auto; /* the auto margins (in conjunction with a width) center the page */ border: 0px; text-align: left; /* this overrides the text-align: center on the body element. */ z-index: 0; } .twoColFixLtHdr #header { background: #ffffff; height:215px; padding: 0 0 0 0; /* this padding matches the left alignment of the elements in the divs that appear beneath it. If an image is used in the #header instead of text, you may want to remove the padding. */ z-index: -1; } .twoColFixLtHdr #header h1 { margin: 0; /* zeroing the margin of the last element in the #header div will avoid margin collapse - an unexplainable space between divs. If the div has a border around it, this is not necessary as that also avoids the margin collapse */ padding: 0px 0; /* using padding instead of margin will allow you to keep the element away from the edges of the div */ } .twoColFixLtHdr #sidebar1 { margin-top:-18px; margin-left:0; background: url(images/sidebar.jpg) no-repeat left top; float: left; /* since this element is floated, a width must be given */ width: 230px; /* the actual width of this div, in standards-compliant browsers, or standards mode in Internet Explorer will include the padding and border in addition to the width */ height:865px; /* the background color will be displayed for the length of the content in the column, but no further */ position:relative; padding: 0; border:none; } .sidebarcat { font: 75% Verdana, Arial, Helvetica, sans-serif; position:absolute; margin-top:69px; margin-left:0; width: 230px; height: 166px; padding: 0; } .sidebarsea { font: 75% Verdana, Arial, Helvetica, sans-serif; position:absolute; margin-top:340px; margin-left:35px; width: 200px; height: 166px; padding: 0; } .twoColFixLtHdr #mainContent { margin: -15px 0 0 250px; /* the left margin on this div element creates the column down the left side of the page - no matter how much content the sidebar1 div contains, the column space will remain. You can remove this margin if you want the #mainContent div's text to fill the #sidebar1 space when the content in #sidebar1 ends. */ padding: 0; /* remember that padding is the space inside the div box and margin is the space outside the div box */ } .twoColFixLtHdr #footer { padding: 0; /* this padding matches the left alignment of the elements in the divs that appear above it. */ margin-bottom:0px; background:#DDDDDD; background-image:url(images/website_1_17.jpg); background-repeat:no-repeat; height:212px; width:973px; } .twoColFixLtHdr #footer p { margin: 0 0 0 0; /* zeroing the margins of the first element in the footer will avoid the possibility of margin collapse - a space between divs */ padding-top: 182px; /* padding on this element will create space, just as the the margin would have, without the margin collapse issue */ padding-bottom:0px; padding-left:200px; font-size:10px; } .fltrt { /* this class can be used to float an element right in your page. The floated element must precede the element it should be next to on the page. */ float: right; margin-left: 8px; } .fltlft { /* this class can be used to float an element left in your page */ float: left; margin-right: 8px; } .clearfloat { /* this class should be placed on a div or break element and should be the final element before the close of a container that should fully contain a float */ clear:both; height:0; font-size: 1px; line-height: 0px; } ul{ margin: 0; } ul.star li{ text-align: left; float: left; list-style: none; padding: 3px 0px 0px 25px; margin: 0; background: url(images/star.jpg) 5px 5px no-repeat; } --> </style><!--[if IE 5]> <style type="text/css"> /* place css box model fixes for IE 5* in this conditional comment */ .twoColFixLtHdr #sidebar1 { width: 230px; } </style> <![endif]--><!--[if IE]> <style type="text/css"> /* place css fixes for all versions of IE in this conditional comment */ .twoColFixLtHdr #sidebar1 { padding-top: 30px; } .twoColFixLtHdr #mainContent { zoom: 1; } /* the above proprietary zoom property gives IE the hasLayout it needs to avoid several bugs */ </style> <![endif]--> </head> <body class="twoColFixLtHdr" onload="MM_preloadImages('images/website__1_07.jpg','images/website__1_08.jpg','images/website__1_09.jpg','images/website__1_10.jpg','images/onceupon_sm_13.jpg','images/findyourstar_sm_13.jpg','images/writealetter_sm_13.jpg','images/journal_sm_13.jpg','images/home_try_06.jpg','images/home_try_13.jpg')"> <div id="container"> <div class="bird"><img src="bird.png" width="178" height="120" alt="birdie go flyfly." /></div> <div id="header"> <table id="Table_01" width="774" height="225" border="0" cellpadding="0" cellspacing="0"> </table><!-- end #header --></div> <div id="sidebar1" style="float: left"> <div class="sidebarcat"> <ul class="star"> <li> some words lalalala</li> <li> some words lalalala</li></ul> </div> <div class="sidebarsea"> <form id="searchthis" action="/search" style="display:inline;" method="get"> <input id="search-box" name="q" size="20" type="text" style="background: #ffffff; border: 1px solid #000000"/> <input id="search-btn" value="Search" type="image" src="images/star.jpg" style="margin: 3px 0 0 5px;"/> </form></div> <!-- end #sidebar1 --></div> <div id="mainContent"> <h1> Main Content </h1> <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Praesent aliquam, justo convallis luctus rutrum, erat nulla fermentum diam, at nonummy quam ante ac quam. Maecenas urna purus, fermentum id, molestie in, commodo porttitor, felis. Nam blandit quam ut lacus. Quisque ornare risus quis ligula. Phasellus tristique purus a augue condimentum adipiscing. Aenean sagittis. Etiam leo pede, rhoncus venenatis, tristique in, vulputate at, odio. Donec et ipsum et sapien vehicula nonummy. Suspendisse potenti. Fusce varius urna id quam. Sed neque mi, varius eget, tincidunt nec, suscipit id, libero. In eget purus. Vestibulum ut nisl. Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque eget, cursus et, fermentum ut, sapien. Fusce metus mi, eleifend sollicitudin, molestie id, varius et, nibh. Donec nec libero.</p> <h2>H2 level heading </h2> <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Praesent aliquam, justo convallis luctus rutrum, erat nulla fermentum diam, at nonummy quam ante ac quam. Maecenas urna purus, fermentum id, molestie in, commodo porttitor, felis. Nam blandit quam ut lacus. Quisque ornare risus quis ligula. Phasellus tristique purus a augue condimentum adipiscing. Aenean sagittis. Etiam leo pede, rhoncus venenatis, tristique in, vulputate at, odio.</p> <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Praesent aliquam, justo convallis luctus rutrum, erat nulla fermentum diam, at nonummy quam ante ac quam. Maecenas urna purus, fermentum id, molestie in, commodo porttitor, felis. Nam blandit quam ut lacus. Quisque ornare risus quis ligula. Phasellus tristique purus a augue condimentum adipiscing. Aenean sagittis. Etiam leo pede, rhoncus venenatis, tristique in, vulputate at, odio.<br class="clearfloat" /> </p> </div></div><div id="container2"> <div id="footer"> </div> Code (markup):
Thank you for reply! But sadly even after adding that to sidebar1, it still seems to be shifted down. It's like in IE there's an extra margin-top of 50 or something..
If I guess your shifted block rite and code posted by you is fine, then this code is creating problem. <div id="header"> <table id="Table_01" width="774" height="225" border="0" cellpadding="0" cellspacing="0"> </table><!-- end #header --></div> HTML: