Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Collapsing Margins - Can't Find What's Doing It 1

Status
Not open for further replies.

Petrolhead

Technical User
Mar 13, 2009
27
I've got an issue with what looks like collapsing margins after adding a sidebar to my site.

I can't figure out what's causing the conflict though??

Any help would be much appreciated.

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "[URL unfurl="true"]http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">[/URL]
 
<html>
<head>
<title>Personal Web Site - Thomas Irvine</title>
<meta name="description" content="Thomas Irvine:  Personal Web Site">
<meta name="keywords" content="Mormon, LDS, Latter Day Saint, Gilberts Syndrome, Excel, VBA, Macro, Cycling, Lyreco, Personal Development,Sci-Fi, Cars, Engineering, Industrial Architecture">
<link rel="stylesheet" type="text/css" href="CSS/Thomas-Irvine.css">
<link rel="stylesheet" type="text/css" href="CSS/print.css" media="print" >
</head>
 
<body>
 
<div id="wrapper">

<div id="banner">
<div id="banner-text">
<span class="banner-title">Thomas Irvine . com</span>
<h1 class="banner-subtitle">Personal Website<sup style="font-size: 50%; position:relative; top:-8px;">&copy;</sup></h1>
</div>  <!-- banner-text -->
</div>  <!-- banner -->
 
<div id="hmenu">
<div id="hnav">
<a href="Index.html">Home</a>
<a href="Blog.html">Blog</a>
<a href="Family.html">Family</a>
<a href="Work.html">Work</a>
<a href="Religion.html">Religion</a>
<a href="Cycling.html">Cycling</a>
<a href="Cars.html">Cars</a>
<a href="Engineering.html">Engineering</a>
<a href="IT.html">IT</a>
<a href="Sci-Fi.html">Sci-Fi</a>
<a href="Gilberts Syndrome.html">Gilbert's Syndrome</a>
<a href="Personal Development.html">Personal Development</a>
<a href="Contact.html">Contact</a>
</div>  <!-- hmenu -->
</div>  <!-- hnav -->
 
<div id="content">
 
<!-- Begin Main Page Content -->
 
<script language="JavaScript" type="Text/Javascript"> 
<!--
function Bookmark()
{
	if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4)) {
		window.external.AddFavorite("[URL unfurl="true"]http://www.stevepavlina.com/","Thomas-Irvine[/URL] - Personal Website");
	} else if (navigator.appName == "Netscape") {
		window.sidebar.addPanel("Personal Development - Steve Pavlina","[URL unfurl="true"]http://www.stevepavlina.com/","");[/URL]
	} else {
		alert("Press CTRL-D (Netscape) or CTRL-T (Opera) to bookmark");
	}
}
//-->
</script>
 
<!-- main content section -->
 
<h1>
Welcome
</h1>
 
<p>
Hello and welcome to my personal web site.
</p>
 
<p>
Be sure to <a href="javascript:Bookmark()"><b>bookmark this site</b></a>, so you can return to it.
</p>

<p>
More text goes here...
</p>

</div>  <!-- content -->

<div id="sidebar">

<div>

<P>
Test Sidebar
</p>

</div>

</div>  <!-- sidebar -->
 
<div id="clearer">&nbsp;</div>

<div id="footer">

<p class="credits">

Copyright &copy; 2009 by Thomas Irvine.<br />

</p>

<div class="credits1111">11:11</div>

</div>  <!-- footer -->

</div>  <!-- rap -->

</body>

</html>

body {
  background: #CDC8B1;
  color: #000;
  font-family: Veranda, Sans-Serif;
  text-align: center;
  margin: 0;
  padding-top: 15px;
  padding-bottom: 15px;
}

#wrapper{
  width: 80%;
  background: White;
  border: 1px solid #8B1A1A;
  text-align: left;
  margin-left: auto;
  margin-right: auto;
  padding: 0;

}

#banner{ 
  background: #8B1A1A;  
  height: 110px;
  border: 0;
  margin: 0;
  padding: 0;
  text-align: center;
  color: White;
}

#masthead-text
{
	text-align: center;
	font: normal normal 70%/120% Verdana, sans-serif;
	padding-top: 12px;
	padding-bottom: 0px;
	margin-bottom: 0px;
}

.banner-title{   
  font: normal bold 375% Veranda, sans-serif; 
  letter-spacing: 2px;
  
}

.banner-subtitle{  
  font: normal bold 140%/170% Verdana, sans-serif;
  letter-spacing: 1px;
  text-align: center;
  color:  white;
  border: none;
  padding: 0;
  margin: 0;
}

#hmenu{ 
  background: #B22222;  
  padding: 0;  
  margin: 0; 
  text-align: center;
  color: white;
  font:normal normal 70%120% Veranda, sans-serif
}

#hnav{
  color: white;
  border: 0;
  padding: 5px;
  margin: 0px;
}

#hnav a {
  color: White;
  text-decoration: none;
  padding-left: 8px;
  padding-right: 8px;
  padding-top: 5px;
  padding-bottom: 5px;
  margin-left: 5px;
  margin-right: 5px;
  font-weight: Bold;
}

#hnav a:hover {
  color: #ffff00;
  background: #FF3030;
}

#content{
  float: right;
  padding-top: 20px;
  padding-left: 5px;
  padding-right: 25px;
  background: #FFF8DC;
  text-align: left;
  margin: 0;
}

#sidebar {
	background: #FFF8DC;
	float: left;
	width: 155px;
	padding-top: 20px;
	padding-left: 10px;
	padding-right: 10px;
	font: normal normal 70%/125% 'Lucida Grande', Verdana, arial, sans-serif;
	color: black;
	border: 0;
	letter-spacing: 0;
	margin: 0;
}

#clearer {
	clear: both;
	height: 0;
}


#footer{
  background: #8B1A1A;
}

.credits
{
	clear: both;
	background: #8B1A1A;
	color: White;
	font-size: 11px;
	padding: 5px;
	text-align: center;
	margin-bottom: 0px;
}

.credits1111
{
	background: #8B1A1A;
	color: White;
	font-size: 9px;
	padding: 0px;
	text-align: right;
	margin-bottom: 0px;
}

p.credits { margin:0; }

p { margin-bottom: 0;}

a {
	color: #00c;
	text-decoration: underline;
}

a:hover {
	color: #44f;
	text-decoration: underline;
}

blockquote {
	font: 80% Verdana, sans-serif;
	margin-left: 30px;
	padding-left: 5px;
}

h1 {
	border-bottom: 1px dotted #ccc;
	color: #009;
	font: bold 140% arial, tahoma, sans-serif;
	margin: 15px 0 15px 0;
	padding-bottom: 2px;
    text-align: left;
}

h2 {
	border-bottom: 1px dotted #ccc;
	color: #009;
	font: bold 100% arial, tahoma, sans-serif;
	margin: 15px 0 2px 0;
	padding-bottom: 2px;
}

h3 {
	border: 0;
	color: #009;
	font: bold 90% arial, tahoma, sans-serif;
	margin: 15px 0 2px 0;
	padding-bottom: 2px;
}

p, li, td {
	font: 80% Verdana, sans-serif;
}

.credits a
{
	color : White;
	font-weight : normal;
	text-decoration : underline;
}

.credits a:hover
{
	color : Yellow;
}

#sidebar a {
	color: #06c;
	text-decoration: none;
}

#sidebar a:hover {
	color: #147;
	text-decoration: underline;
}
 
Are you talking about the fact that the left column containing the div sidebar is not flowing to the bottom of the page to match div Content?
 
Yes,

Is there a way to force this to the bottom or do I simply have to adjust the wrapper background to match the colour of the sidebar and content.

had a look on firebug and I can't see any collapsing margins.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top