Forum Moderators: not2easy

Message Too Old, No Replies

Problem with pic overflowing into footer

         

foundfrank

12:01 pm on Nov 21, 2008 (gmt 0)

10+ Year Member



I'm using a fluid template for a site and have inserted an image in the content div, but it overflows into the footer. This is the only problem I really have with the code (although I'm not that experienced with CSS; I'm using Dreamweaver and still can't get it right =( ), I don't know how to prevent this from happening. Any help would be appreciated.

<!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>COMPANY NAME</title>
<style type="text/css" media="all">
<!--
/* This rule resets a core set of elements so that they will appear consistent across browsers. Without this rule, content styled with an h1 tag, for example, would appear in different places in Firefox and Internet Explorer because each browser has a different top margin default value. By resetting these values to 0, the elements will initially be rendered in an identical fashion and their properties can be easily defined by the designer in any subsequent rule. */
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6 {
margin: 0;
padding: 0;
border: 0;
outline: 0;
font-size: 100%;
}
/* The body is the outermost layout component and contains the visible page content. Setting properties for the body element will help to create consistent styling of the page content and more manageable CSS. Besides using the body element to set global properties, it is common to use the body element to set the background color of the page and create a centered container for the page content to display. */
body {
background-color: #2b3a3c;
color: #000000;
font-family: Arial, Helvetica, sans-serif;
font-size: 11px;
line-height: 14px;
margin: 0 0 0 0; /* Sets the margin properties for an element using shorthand notation (top, right, bottom, left) */
padding: 0 0 0 0; /* Sets the padding properties for an element using shorthand notation (top, right, bottom, left) */
text-align: center; /* Centers the page content container in IE 5 browsers. */
background-image: url(spectra.jpg);
}
/* Commonly used to style page titles. */
h1 {
color: #000000;
font-size: 14px;
font-weight: bold;
line-height: 14px;
}
/* Commonly used to style section titles. */
h2 {
color: #6d9863;
font-size: 12px;
font-weight: bold;
line-height: 14px;
}
/* Sets the style for unvisited links. */
a, a:link {
color: #000000;
font-weight: bold;
text-decoration: none;
}
/* Sets the style for visited links. */
a:visited {
color: #000000;
font-weight: bold;
text-decoration: none;
}
/* Sets the style for links on mouseover. */
a:hover {
color: #000000;
text-decoration: underline;
}
/* Sets the style for a link that has focus. */
a:focus {
color: #000000;
}
/* Sets the style for a link that is being activated/clicked. */
a:active {
color: #000000;
}
/* This is a container for the page content. It is common to use the container to constrain the width of the page content and allow for browser chrome to avoid the need for horizontal scrolling. For fixed layouts you may specify a container width and use auto for the left and right margin to center the container on the page. IE 5 browser require the use of text-align: center defined by the body element to center the container. For liquid layouts you may simply set the left and right margins to center the container on the page. */
#outerWrapper {
background-color: #fff;
margin: 0 auto 0 auto; /* Sets the margin properties for an element using shorthand notation (top, right, bottom, left) */
min-width: 760px;
text-align: left; /* Redefines the text alignment defined by the body element. */
width: 80%;
top: 80%;
}
#outerWrapper #header {
background-color: #8ab573;
border-bottom: solid 1px #628152; /* Sets the bottom border properties for an element using shorthand notation */
font-size: 18px;
font-weight: bold;
line-height: 15px;
padding: 10px 10px 10px 10px; /* Sets the padding properties for an element using shorthand notation (top, right, bottom, left) */
background-image: url(matta700.jpg);
}
#outerWrapper #contentWrapper #leftColumn1 {
background-color: #eef6ed;
border-right: solid 1px #8ab573; /* Sets the right border properties for an element using shorthand notation */
float: left;
padding: 10px 10px 10px 10px; /* Sets the padding properties for an element using shorthand notation (top, right, bottom, left) */
width: 24%;
}
/* Contains the main page content. When using a mutliple column layout the margins will be set to account for the floated columns' width, margins, and padding. */
#outerWrapper #contentWrapper #content {
margin: 0 0 0 0%; /* Sets the margin properties for an element using shorthand notation (top, right, bottom, left) */
padding: 10px 10px 10px 10px; /* Sets the padding properties for an element using shorthand notation (top, right, bottom, left) */
height: auto;
}
/* Using floated elements and a clear float class is a common method to accomplish multiple column tableless layouts. If floated elements are used without being cleared the elements following will wrap around the floated element. This class should be applied to an element after the last floated element and before the close of the container with floated elements. */
#outerWrapper #contentWrapper .clearFloat {
clear: left;
display: block;
}
#outerWrapper #footer {
background-color: #eef6ed;
border-top: solid 1px #8ab573; /* Sets the top border properties for an element using shorthand notation */
padding: 10px 10px 10px 10px; /* Sets the padding properties for an element using shorthand notation (top, right, bottom, left) */
background-image: url(matta700.jpg);
}
-->
</style>
<style type="text/css" media="print">
<!--
/* It is common to set printer friendly styles such as a white background with black text. */
body {
background-color: #fff;
background-image: none;
border-color: #000; /* Sets the border color properties for an element using shorthand notation */
color: #000;
}
-->
</style>
<!--[if IE 5]>
<style type="text/css">
/* IE 5 does not use the standard box model, so the column widths are overidden to render the page correctly. */
#outerWrapper #contentWrapper #leftColumn1 {
width: 26%;
}
</style>
<![endif]-->
<!--[if IE]>
<style type="text/css">
/* The proprietary zoom property gives IE the hasLayout property which addresses several bugs. */
#outerWrapper #contentWrapper #content {
zoom: 1;
}
</style>
<![endif]-->
<style type="text/css">
<!--
.style1 {
font-family: "Bookman Old Style";
font-style: italic;
color: #000000;
}
.style2 {
color: #000000;
font-weight: bold;
}
.style3 {font-size: 36px}
.style4 {color: #000000}
.style5 {
font-size: 130%;
font-weight: bold;
}
.style6 {
font-family: "Bookman Old Style";
font-weight: bold;
font-style: italic;
}
.style7 {font-style: italic; font-family: "Bookman Old Style";}
-->
</style>
</head>
<body>
<div id="outerWrapper">
<div class="style1" id="header">
<p><img src="ktexp.jpg" alt="" name="KT" width="99" height="79" id="KT" /><span class="style3">Company Name</span></p>
<table width="545" border="0">
<tr>
<td width="84"><a href="index.html" class="style4">ETUSIVU</a></td>
<td width="125"><a href="hautakivet.html">HAUTAKIVET</a></td>
<td width="157"><a href="sisustuskivet.html">SISUSTUSKIVET</a></td>
<td width="151"><a href="yhteystiedot.html">YHTEYSTIEDOT</a></td>
</tr>
</table>
<script language = "javascript">
<!--
theObjects = document.getElementsByTagName("object");
for (var i = 0; i < theObjects.length; i++) {
theObjects[i].outerHTML = theObjects[i].outerHTML;}
//-->
</script>
</p>
</div>
<div id="contentWrapper">
<div id="content">
<h1><img src="kivibldg.jpg" alt="CSS Sculptor" width="681" height="425" align="left" style="margin-right:10px;"/></h1>
<p><u><span class="style5">TIETOA YRITYKSESTÄMME</span></u></p>
<p>COMPANY NAME on perheyritys, joka on perustettu vuonna 1982. Tällöin yhtiön perustaja oli työskennellyt kivialalla jo 15 vuotta, joten yhteensä yli 40 vuoden kokemuksella voimme taata asiakkaillemme mittatarkat ja laadukkaat tuotteet. Toiminta-alueemme on ja niiden ympäristökunnat. Tuotantolaitoksemme Vantaan Porttipuistossa on pääkaupunkiseudun ainoa raakakiveä jalostava kiviveistämö. Keskeisen sijaintimme ansiosta asiakas voi halutessaan tulla seuraamaan oman tilauksen valmistumista sovittuna ajankohtana.</p>
<p class="style6">Company Name</p>
<p class="style7">Kiviteollisuusliiton jäsen</p>
</div>
<p>&nbsp;</p>
</div>
<div class="style2" id="footer">&copy; COMPANY NAME</div>
</div>
</body>

lavazza

12:30 pm on Nov 21, 2008 (gmt 0)

10+ Year Member



Although I didn't read all of the code in your post, the subject line of this thread leads me to suggest that you try the following

after
#outerWrapper #contentWrapper #content {
height: auto;
}

add
#content {
clear:both;
}

or

instead of
#outerWrapper #contentWrapper #content {
height: auto;
}

try
#outerWrapper #contentWrapper #content {
height: auto;
clear:both;
}