Irresistable Posted November 8, 2009 Share Posted November 8, 2009 See the example here.. www.developers-community.com The update section, is going over the "blue bar" that goes across, which I call the topbar. In the designer view of dreamweaver CS4, it shows that the update box is actually BELOW the topbar. Not JUST below, but below quite a bit. Here -> http://i278.photobucket.com/albums/kk87/JeanieTallis/divproblem.png Here is my Html <!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"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Developers Community - Homepage</title> <link href="styles/twoColLiqRtHdr.css" rel="stylesheet" type="text/css" /><!--[if IE]> <style type="text/css"> /* place css fixes for all versions of IE in this conditional comment */ .twoColLiqRtHdr #sidebar1 { padding-top: 30px; } .twoColLiqRtHdr #mainContent { zoom: 1; padding-top: 15px; } /* the above proprietary zoom property gives IE the hasLayout it needs to avoid several bugs */ </style> <![endif]--> </head> <body class="twoColLiqRtHdr"> <div id="container"> <div id="header"> <h1> </h1> <!-- end #header --> <br /> <div class="navigator" id="navigator"> <ul id="navigator"> <li class="active"><a href="/">Home</a></li> <li><a href="/tutorials.php">Tutorials</a></li> <li><a href="/jobvac.php">Job Vacancies</a></li> <li><a href="/contactus.php">Contact Us</a></li> <li><a href="/forums">Forums</a></li> <div id="time"><script type="text/javascript"> var d=new Date() var weekday=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday") var monthname=new Array("January","February","March","April","May","June","July","August","September","October","November","December") document.write(weekday[d.getDay()] + " ") document.write(d.getDate() + " ") document.write(monthname[d.getMonth()] + " ") document.write(d.getFullYear()) </script> </div> </ul> </div> <div class="twoColLiqRtHdr" id="topbar"> </div> </div> <div id="sidebar1"> <h3>Updates</h3> <?php include("Updates/updatediv.php"); ?> <!-- end #sidebar1 --> </div> <div id="mainContent"> <h1> Homepage </h1> <p>Welcome to Developers Community, this is a place for all developers to discuss development! No, this isn't about the Empire State Building. This is about Operating Systems, PC's & Macs, along with Software, and Website development. There is help forums for most code forms, which you may participate in. On this website, will have tutorials for people to follow too. </p> <h2>Who Are We?</h2> <p>We are a community to help developers, and discuss about development. We decided to do this website and forum, as so many people never find the answer to fix there script errors. We will try our best to make sure your script gets a fix, and to keep you enjoying the website. If there is something you'd like to be seen on the website or forums. There is an Idea forum, which you may use. We do not know the answer to all your errors, however.. that is exactly why there is help forums. Other members, will participate in helping you if they know the answer to your error.</p> <p>The staff here are friendly, and will assist you as much as possible, if there are any members that are bullying you here in Developers Community, contact one of our Moderators on the Forums, or the Admin. You may use the Contact Us option on the website also. </p> <p>We do not tollerate Racism, or any kind of abuse towards other members. As this can affect peoples lives. This is for Developers only.</p> <p>If you would like to contact us, about any issues on this website. (Spelling mistake, broken link, etc) Either contact the Mods, or Admins on the Forums, or use the Contact Us option.</p> </div> <!-- This clearing element should immediately follow the #mainContent div in order to force the #container div to contain all child floats --><br class="clearfloat" /> <div id="footer"> <p><a href="contactus.php">Contact</a> // <a href="termsofservice.php">Terms of Service</a> // <a href="policy.php">Privacy Policy</a><br /> Developers-Community © 2009</p> <!-- end #footer --></div> <!-- end #container --></div> </body> </html> here is the CSS @charset "utf-8"; 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; /* this centers the container in IE 5* browsers. The text is then set to the left aligned default in the #container selector */ color: #000000; } .twoColLiqRtHdr #time { text-align: right; padding: 0 4px 0 0; } .twoColLiqRtHdr #container { width: 900px; /* this will create a container 80% of the browser width */ background: #FFFFFF; margin-left: auto; margin-right: auto; border: 1px solid #000000; /* this overrides the text-align: center on the body element. */ } .twoColLiqRtHdr #header { background: #FFFFFF; background-image: url(../images/dcbanner.jpg); padding: 0 0px; /* 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. */ height: 106px; } .twoColLiqRtHdr #navigator { height:30px; line-height:30px; background:url(../images/menu.jpg) repeat-x; list-style:none; margin:0; padding:0 0 0 10px } .twoColLiqRtHdr #navigator li { display: block; float:left; margin:0; padding:0 } .twoColLiqRtHdr #navigator li a { display:block; float:left; color:#333; text-transform:uppercase; text-decoration:none; font-size:10px; margin:0 0 0 1px; padding:0 10px; width: 94px; } .twoColLiqRtHdr #navigator li.active a, #navigator li a:hover { background: url(../images/navlink.jpg) repeat-x; color:#fff } .twoColLiqRtHdr #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: 10px 0; /* using padding instead of margin will allow you to keep the element away from the edges of the div */ } .twoColLiqRtHdr #topbar { height: 10px; background-image: url(../images/topbar.jpg); } /* Tips for sidebar1: 1. since we are working in percentages, it's best not to use padding on the sidebar. It will be added to the width for standards compliant browsers creating an unknown actual width. 2. Space between the side of the div and the elements within it can be created by placing a left and right margin on those elements as seen in the ".twoColLiqRtHdr #sidebar1 p" rule. 3. Since Explorer calculates widths after the parent element is rendered, you may occasionally run into unexplained bugs with percentage-based columns. If you need more predictable results, you may choose to change to pixel sized columns. */ .twoColLiqRtHdr #sidebar1 { float: right; /* since this element is floated, a width must be given */ width: 24%; background: #EBEBEB; /* the background color will be displayed for the length of the content in the column, but no further */ } .twoColLiqRtHdr #sidebar1 h3, .twoColLiqRtHdr #sidebar1 p { margin-left: 10px; /* the left and right margin should be given to every element that will be placed in the side columns */ margin-right: 10px; } /* Tips for mainContent: 1. the space between the mainContent and sidebar1 is created with the right margin on the mainContent div. No matter how much content the sidebar1 div contains, the column space will remain. You can remove this right margin if you want the #mainContent div's text to fill the #sidebar1 space when the content in #sidebar1 ends. 2. to avoid float drop at a supported minimum 800 x 600 resolution, elements within the mainContent div should be 430px or smaller (this includes images). 3. in the Internet Explorer Conditional Comment below, the zoom property is used to give the mainContent "hasLayout." This avoids several IE-specific bugs. */ .twoColLiqRtHdr #mainContent { margin: 0 26% 0 10px; /* the left margin should mirror the margin on the header and footer for proper alignment. */ } .twoColLiqRtHdr #footer { padding: 0 10px; /* this padding matches the left alignment of the elements in the divs that appear above it. */ background:#DDDDDD; } .twoColLiqRtHdr #footer p { margin: 0; /* zeroing the margins of the first element in the footer will avoid the possibility of margin collapse - a space between divs */ padding: 10px 0; /* padding on this element will create space, just as the the margin would have, without the margin collapse issue */ text-align: center; } /* Miscellaneous classes for reuse */ .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. The floated element must precede the element it should be next to on the 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; } .twoColLiqRtHdr #container #header #navigator a { font-weight: bold; text-align: center; } The updates bar, is called sidebar1 maincontent - the main content of the page navigator - navigator header - banner area with the navigator in Also. On the pic.. you'll see that its the maincontent thats below too. I've checked everything and cant find out why. I want the main content, and the updates section, to be directly under the blue topbar. Hope you can help Quote Link to comment Share on other sites More sharing options...
Irresistable Posted November 8, 2009 Author Share Posted November 8, 2009 margin-top: 10px In the Sidebar 1, section. Did the trick. Quote Link to comment Share on other sites More sharing options...
haku Posted November 10, 2009 Share Posted November 10, 2009 Ignore Dreamweaver, it's not a browser. Unless you think that the majority of your users will be viewing your site in Dreamweaver. In that case you can ignore the browser output. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.