rede
09-01-2007, 11:41 PM
Hi All
I have modifed a CSS page that I found on the web via Dynamic Drives, but am having a problem with it.
Here is the HTML:
<body>
<div id="container">
<div id="top">
<h1>Header</h1>
</div>
<div id="globalnavigation"><div class="shadetabs">
<ul>
<li><a href="http://www.dynamicdrive.com">Home</a></li>
<li><a href="http://www.dynamicdrive.com/new.htm">DHTML</a></li>
<li class="selected"><a href="http://www.dynamicdrive.com/style/">CSS</a></li>
<li><a href="http://www.dynamicdrive.com/forums/">Forums</a></li>
<li><a href="http://tools.dynamicdrive.com/imageoptimizer/">Gif Optimizer</a></li>
</ul>
</div>
<div id="leftnav">
<p>Left box </p>
</div>
<div id="rightnav">
<p>Right box </p>
<p> </p>
<p> </p>
</div>
<div id="content">
<h2>Subheading</h2>
</div>
<div id="footer">
<p>Footer</p>
</div>
</body>
</html>
Here is the CSS:
#container
{
width: 99.8%;
background-color: #fff;
color: #333;
border: 1px solid gray;
line-height: 130%;
}
p {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 0.8em;
}
#top
{
padding: 0.5em;
border-bottom: 1px solid gray;
height: 75px;
background-image: url(Images/gradienthead.jpg);
}
#top h1
{
padding: 0;
margin: 0;
}
.shadetabs{
border-bottom: 1px solid gray;
/* width: 90%; width of menu. Uncomment to change to a specific width */
margin-bottom: 1em;
}
.shadetabs ul{
padding: 3px 0;
margin-left: 0;
margin-top: 1px;
margin-bottom: 0;
font: bold 12px Verdana;
list-style-type: none;
text-align: center; /*set to left, center, or right to align the menu as desired*/
}
.shadetabs li{
display: inline;
margin: 0;
}
.shadetabs li a{
text-decoration: none;
padding: 3px 7px;
margin-right: 3px;
border: 1px solid #778;
color: #2d2b2b;
background-color: #C9EBF5;
background-repeat: repeat-x;
background-position: left top;
}
.shadetabs li a:visited{
color: #2d2b2b;
}
.shadetabs li a:hover{
text-decoration: underline;
color: #2d2b2b;
}
.shadetabs li.selected{
position: relative;
top: 1px;
}
.shadetabs li.selected a{ /*selected main tab style */
background-image: url(Images/shadeactive.gif);
border-bottom-color: white;
}
.shadetabs li.selected a:hover{ /*selected main tab style */
text-decoration: none;
}
#leftnav
{
float: left;
width: 203px;
margin: 0;
background-image: url(gradientwidth235.jpg);
background-repeat: no-repeat;
padding: 1em;
}
#rightnav
{
float: right;
width: 203px;
margin: 0;
padding: 1em;
background-image: url(gradientwidth235.jpg);
background-repeat: no-repeat;
}
#content
{
margin-left: 235px;
margin-right: 235px;
padding: 1em;
border-right-width: 1px;
border-bottom-width: 1px;
border-left-width: 1px;
border-right-style: solid;
border-bottom-style: solid;
border-left-style: solid;
border-right-color: gray;
border-bottom-color: #999999;
border-left-color: gray;
max-width: 60em;
}
#footer
{
clear: both;
margin: 0;
padding: 0em;
color: #333;
text-align: center;
}
#leftnav p, #rightnav p { margin: 0 0 1em 0; }
#content h2 { margin: 0 0 .5em 0; }
#globalnavigation {
margin: 0px;
padding-top: 10px;
}
body {
margin: 0px;
padding: 0px;
}
My question is - there is a small gap between the bottom of the navigation bar and the following three boxes: left box, right box, Subheading content box. I have tried everything to try and get rid of it without any luck. I would basically like the three boxes to touch the navigation bar instead of there being a gap. If any one can shed some light, I'd be very grateful. Thanks in advance!
Rachael
I have modifed a CSS page that I found on the web via Dynamic Drives, but am having a problem with it.
Here is the HTML:
<body>
<div id="container">
<div id="top">
<h1>Header</h1>
</div>
<div id="globalnavigation"><div class="shadetabs">
<ul>
<li><a href="http://www.dynamicdrive.com">Home</a></li>
<li><a href="http://www.dynamicdrive.com/new.htm">DHTML</a></li>
<li class="selected"><a href="http://www.dynamicdrive.com/style/">CSS</a></li>
<li><a href="http://www.dynamicdrive.com/forums/">Forums</a></li>
<li><a href="http://tools.dynamicdrive.com/imageoptimizer/">Gif Optimizer</a></li>
</ul>
</div>
<div id="leftnav">
<p>Left box </p>
</div>
<div id="rightnav">
<p>Right box </p>
<p> </p>
<p> </p>
</div>
<div id="content">
<h2>Subheading</h2>
</div>
<div id="footer">
<p>Footer</p>
</div>
</body>
</html>
Here is the CSS:
#container
{
width: 99.8%;
background-color: #fff;
color: #333;
border: 1px solid gray;
line-height: 130%;
}
p {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 0.8em;
}
#top
{
padding: 0.5em;
border-bottom: 1px solid gray;
height: 75px;
background-image: url(Images/gradienthead.jpg);
}
#top h1
{
padding: 0;
margin: 0;
}
.shadetabs{
border-bottom: 1px solid gray;
/* width: 90%; width of menu. Uncomment to change to a specific width */
margin-bottom: 1em;
}
.shadetabs ul{
padding: 3px 0;
margin-left: 0;
margin-top: 1px;
margin-bottom: 0;
font: bold 12px Verdana;
list-style-type: none;
text-align: center; /*set to left, center, or right to align the menu as desired*/
}
.shadetabs li{
display: inline;
margin: 0;
}
.shadetabs li a{
text-decoration: none;
padding: 3px 7px;
margin-right: 3px;
border: 1px solid #778;
color: #2d2b2b;
background-color: #C9EBF5;
background-repeat: repeat-x;
background-position: left top;
}
.shadetabs li a:visited{
color: #2d2b2b;
}
.shadetabs li a:hover{
text-decoration: underline;
color: #2d2b2b;
}
.shadetabs li.selected{
position: relative;
top: 1px;
}
.shadetabs li.selected a{ /*selected main tab style */
background-image: url(Images/shadeactive.gif);
border-bottom-color: white;
}
.shadetabs li.selected a:hover{ /*selected main tab style */
text-decoration: none;
}
#leftnav
{
float: left;
width: 203px;
margin: 0;
background-image: url(gradientwidth235.jpg);
background-repeat: no-repeat;
padding: 1em;
}
#rightnav
{
float: right;
width: 203px;
margin: 0;
padding: 1em;
background-image: url(gradientwidth235.jpg);
background-repeat: no-repeat;
}
#content
{
margin-left: 235px;
margin-right: 235px;
padding: 1em;
border-right-width: 1px;
border-bottom-width: 1px;
border-left-width: 1px;
border-right-style: solid;
border-bottom-style: solid;
border-left-style: solid;
border-right-color: gray;
border-bottom-color: #999999;
border-left-color: gray;
max-width: 60em;
}
#footer
{
clear: both;
margin: 0;
padding: 0em;
color: #333;
text-align: center;
}
#leftnav p, #rightnav p { margin: 0 0 1em 0; }
#content h2 { margin: 0 0 .5em 0; }
#globalnavigation {
margin: 0px;
padding-top: 10px;
}
body {
margin: 0px;
padding: 0px;
}
My question is - there is a small gap between the bottom of the navigation bar and the following three boxes: left box, right box, Subheading content box. I have tried everything to try and get rid of it without any luck. I would basically like the three boxes to touch the navigation bar instead of there being a gap. If any one can shed some light, I'd be very grateful. Thanks in advance!
Rachael