Alt131 - Thanks a lot the idea (use of margins instead of padding), it solved the problem and all the links now work. It opened up a few more issues because it caused the #mainContent to lay over the navbar so I inserted (position: relative; z-index: 1;) in the #navbar and that threw the navbar over the #mainContent (I think) and the navbar is fully functinal again. Now the only thing I have spent the last 6 hours trying to resolve is why the content in the #mainContent will not expand down the page. Instead all the "B's" I typed into my html file are all inline infinitely as many as I type off the right of the page. I have played with floats and clears in the #container because that resolved someone elses problem (I was perusing similar problems in the forum) and that does not appear to be working for me or I have not figured out the right combination. I obviously am missing something and I surely cannot "see visually in my mind" what the problem is. Expanding down the page works in both #sidebars (and yep the links all work thanks to your suggestion). I validated the html and css and solved a couple problems that existed but now am look up to you (in a kneeling position) hoping for a solution to the current hurdle so I can create another one. I am so close and I have got to admit this HTML/CSS stuff is rather exciting (although frustrating at times). What should I try? And once again thanks in advance. Here is the code and .css.
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>Home Garden Workshop</title>
<link href="ThreeColLiqLtHdr.css" rel="stylesheet" type="text/css" />
<!--[if IE]>
<style type="text/css">
/* place css fixes for all versions of IE in this conditional comment */
.ThreeColLiqLtHdr #sidebar1 { padding-top: 30px; }
.ThreeColLiqLtHdr #mainContent { zoom: 1; padding-top: 15px; }
/* the above proprietary zoom property gives IE the hasLayout it needs to avoid several bugs */
</style>
<![endif]-->
<style type="text/css">
<!--
.image{
border-style: outset;
border-color:red;
border-width:10px;
}
.quote{
border-style:groove;
border-color:navy;
border-width:15px;
}
body {
background-color:#F3F7F2;
} -->
<!-- end of #style -->
</style>
<!-- end of #head -->
</head>
<body bgcolor="#295E3D" class="ThreeColLiqLtHdr">
<div id="container">
<div id="header">
<h1><img src="images/Homegardenheaderwbee.gif" width="100%" height="152" alt="Home Garden Workshop" /></h1>
<!-- end of #header div -->
</div>
<div id="navbar">
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="welcome.html" title="Welcome">Welcome</a></li>
<li><a href="feedback.html">Feedback</a></li>
</ul>
<!-- end of #navbar div -->
</div>
<div id="sidebar1">
<div id="news">
<h2>HOT TOPICS</h2>
<div class="hr-dots"> </div>
<h3>04/20/11</h3>
<p><a href="chickens.html">Chickens in the Yard</a>.</p>
<div class="hr-dots"> </div>
<!-- end of news div -->
</div>
<!-- end of #sidebar1 div -->
</div>
<div id="sidebar2">
<script type="text/javascript"><!--
google_ad_client = "pub-123";
/* Sidebar2_top_120x240, created 3/12/11 */
google_ad_slot = "123";
google_ad_width = 120;
google_ad_height = 240;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<h2>HOT TOPICS</h2>
<h3>04/20/11</h3>
<p><a href="chickens.html">Chickens in the Yard</a>.</p>
<div class="hr-dots"> </div>
<!-- end of #sidebar2 div -->
</div>
<div id="mainContent">
<h1>Teach Our Children to Garden</h1>
<p><img src="images/burg.jpg" alt="A meal." width="162" height="129" hspace="10" align="left" />Example text.</p>
<h3>Key Findings:</h3>
<ul>
<li>Example text</li>
<li>Example text</li>
<li>Example text</li>
</ul>
<h3>Conclusion:</h3>
<p>Example text.</p>
<p>Example text.</p>
<p>Example text.</p>
<p>Example text.b</p>
<!-- end of #mainContent div -->
</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>Copyright © 2010-2011 by CEM</p>
<!-- end of #footer div -->
</div>
<!-- end of #container div -->
</div>
<!-- end of #body div -->
</body>
</html>
THE CSS
_______________________________
@charset "utf-8";
body {
font: 90% 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: justify; /* this centers the container in IE 5* browsers. The text is then set to the left aligned default in the #container selector */
color: #000000;
}
#navbar {
width: 100%;
float: left;
margin: 0 0 1em 0;
position: relative; z-index: 1;
padding: 0;
background-color: #F3F7F2;
border-bottom: 1px solid #ccc;
}
#navbar ul {
list-style: none;
width: 100%;
margin: 0 auto;
padding: 0;
}
#navbar li {
float: left;
}
#navbar li a {
display: block;
height: 9%;
padding: 8px 15px;
text-decoration: none;
font-weight: bold;
color: #0B615E;
border-right: 1px solid #ccc;
}
#navbar li:first-child a {
border-left: 1px solid #ccc;
}
#navbar li a:hover {
color: #c00;
background-color: #fff;
}
.ThreeColLiqLtHdr #container {
width: 60%; /* this will create a container 50% of the browser width */
background: #FFFFFF;
margin: 0 auto; /* the auto margins (in conjunction with a width) center the page */
border: 2px solid #0B615E;
text-align: left; /* this overrides the text-align: center on the body element. */
}
.ThreeColLiqLtHdr #header {
background: #DDDDDD;
padding: 0px 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. */
}
.ThreeColLiqLtHdr #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: 0; /* using padding instead of margin will allow you to keep the element away from the edges of the div */
border: 1px solid #FFFFFF;
}
/* Tips for mainContent:
1. the space between the mainContent and sidebar1 is created with the left margin on the mainContent div. No matter how much content the sidebar1 div contains, the column space will remain. You can remove this left 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.
*/
.ThreeColLiqLtHdr #mainContent {
position: relative;
margin: 0px 200px;
font-family: Verdana, Arial, Helvetica, sans-serif;
background-color: #FFF;
}
/* 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 ".twoColLiqLtHdr #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.
*/
.ThreeColLiqLtHdr #sidebar1 {
float: left;
width: 20%; /* since this element is floated, a width must be given */
background-color: #FFF; /* the background color will be displayed for the length of the content in the column, but no further */
padding: 0px 0px; /* top and bottom padding create visual space within this div */
}
.ThreeColLiqLtHdr #sidebar1 h2, .ThreeColLiqLtHdr #sidebar1 h3, .ThreeColLiqLtHdr #sidebar1 p {
margin-left: 0px; /* the left and right margin should be given to every element that will be placed in the side columns */
margin-right: 0px;
}
#news {
padding-left: 15px;
padding-right: 20px;
padding-bottom: 3px;
text-align: left;
}
#news h2 {
font-size: 12px;
color: #0B615E;
text-align: left;
}
#news h3, #news p {
font-size: 11px;
margin: 1em 8px 1em 0;
}
#news a {
color: #74653D;
font-weight: bold;
text-decoration: underline;
}
#news a:hover {
color: #38301A;
}
#news .more {
font-size: 9px;
}
#news .hr-dots {
background: center url(images/dots.gif) repeat-x;
height: 10px;
}
.ThreeColLiqLtHdr #sidebar2 {
float: right;
width: 15%; /* since this element is floated, a width must be given */
background-color: #FFF; /* the background color will be displayed for the length of the content in the column, but no further */
padding: 0px 0px; /* top and bottom padding create visual space within this div */
}
.ThreeColLiqLtHdr #sidebar2 h3, .ThreeColLiqLtHdr #sidebar2 p {
margin-left: 0px; /* the left and right margin should be given to every element that will be placed in the side columns */
margin-right: 0px;
}
.ThreeColLiqLtHdr #footer {
padding: 0 10px; /* this padding matches the left alignment of the elements in the divs that appear above it. */
background: #DDDDDD;
}
.ThreeColLiqLtHdr #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 */
}
/* 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 */
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;
}
[edited by: eelixduppy at 12:06 am (utc) on Apr 26, 2011] [edited by: alt131 at 12:59 pm (utc) on Nov 27, 2011]
[edit reason] fixed side scroll [/edit]