I am coding a web page. I currently have two problems:
1. The right column and nav menu do not show up in Internet Explorer 7
2. My webpage will not stay at 100% not matter what I do.
I have spent all day on this (searched google etc), attempting to resolve the issue and I am posting here as a last resort to see if someone can see if I have an error in my style sheet. I have removed met-tags to reduce lenghth of code.
HTML:
CSSCode:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <!--[if IE 5]> <style type="text/css"> /* place css box model fixes for IE 5* in this conditional comment */ #rightSideBar { width: 220px; } </style> <![endif]--> <!--[if IE]> <style type="text/css"> /* place css fixes for all versions of IE in this conditional comment */ #rightSideBar { padding-top: 30px; } #mainContent { zoom: 1; } /* the above proprietary zoom property gives IE the hasLayout it needs to avoid several bugs */ </style> <![endif]--> </head> <body> <div id="container"><br /> <div id="header"> <h1>Header</h1><br /><br /><br /> <div id="nav"> <ul> <li id="currentpage"><a href="index.html">home</a> </li> <li><a href="services.html">services</a> </li> <li><a href="work.html">work</a> </li> <li><a href="about.html">about</a> </li> <li><a href="contact.php">contact</a></li> </ul> </div> </div><br /><br /><br /> <div id="rightSideBar"> <h3>Sidebar1 Content</h3><br /> <p>The background color on this div will only show for the length of the content. If you'd like a dividing line instead, place a border on the right side of the #mainContent div if it will always contain more content. </> <p>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> </div> <div id="mainContent"> <h1> Main Content </h1><br /> <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><br /><br /> <h2>H2 level heading </h2><br /> <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> </div> </div> <div id="footer"> © 2007 | All Rights Reserved | Website Hand Coded </div> </body> </html>
Code:/***** global *****/ * { margin: 0px; padding: 0px; } html { height: 100%; } body { font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; color: #666; font-size: 11px; line-height: 20px; letter-spacing: 1px; background: #FFFFFF; text-align: center; border-top: 5px solid #06C; height: 100%; } /***** container *****/ #container { width: 780px; text-align: left; margin: 0 auto; height: auto !important; height: 100%; min-height: 100%; } /***** header *****/ h1 { font-family: "Lucida Fax", Georgia, Times, "Times New Roman", Helvetica, Verdana; color: #333; font-size: 14px; font-weight: normal; line-height: 20px; } h2 { font-family: "Lucida Fax", Georgia, Times, "Times New Roman", Helvetica, Verdana; color: #333; font-size: 12px; font-weight: normal; line-height: 20px; } h3 { font-family: "Lucida Fax", Georgia, Times, "Times New Roman", Helvetica, Verdana; color: #333; font-size: 10px; font-weight: bold; line-height: 20px; } /***** navigation *****/ #nav { float: right; font-size: 12px; } #nav li { list-style: none; display: inline; float: left; margin: 0px 0px 0px 20px; } #nav li a { color:#06C; text-decoration: none; } #nav li a:hover { color: #f60; text-decoration: none; } /***** main content *****/ #mainContent { margin: 0 250px 0 0; padding: 0px 15px 0px 0px; border-right: 1px dashed #ccc; } /***** right sidebar *****/ #rightSideBar { float: right; width: 200px; background: #FFFFFF; padding: 50px 10px; } /***** footer *****/ #footer { font-size: 10px; color:#000; text-align: center; background:#d6eaff repeat-x; border-top: 5px solid #06C; padding: 10px 0; }



Reply With Quote
Bookmarks