PDA

View Full Version : Crazy Footer Mystery


scottcom4
06-10-2009, 11:29 PM
Good Morning All,

I am new to using DW, so I apologise for having to ask what I assume is a basic question. I am hoping that someone will be kind enough to help me out. I have included screenshots to better explain my issues.

I have set up a template of how I want the site to look with a spry menu to the left and the overall size of the page. Unfortunately, I can not get the footer to do what I want, which is have a background image which is filled entirely with the Background image I have dictated (the pink and pink stripes). It almost appears as though the footer has somehome become part of the body. I have attempted to resize things but to no avail.

In addition to this the Text body has failed to indent. I have tried setting the margins and the padding to 2cm, however this has not solved the problem. When I look at the site on Dreamweaver it looks fine, however when I output it to a web browser the margins seem to be removed.

Thank you very much for your help.

edbr
06-11-2009, 12:01 AM
need your code to help you

scottcom4
06-11-2009, 08:15 AM
need your code to help you

Please find the code attached.

I appreciate you having a lookm at this for me.

<!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>Untitled Document</title>
<style type="text/css">
<!--
body {
margin: 0; /* it's good practice to zero the margin and padding of the body element to account for differing browser defaults */
padding: 1cm;
text-align: center; /* this centers the container in IE 5* browsers. The text is then set to the left aligned default in the #container selector */
color: #000000;
background-image: url(Background---Dark.jpg);
font-family: "Brock Script";
font-size: 100%;
border: medium none #000;
vertical-align: middle;
height: 19cm;
}
.twoColLiqLtHdr #container {
width: 21.2cm; /* this will create a container 80% of the browser width */
background-color: #DDDDDD;
background-image: url(Background---Light.jpg); /* the auto margins (in conjunction with a width) center the page */
border: thick solid #000000;
text-align: left; /* this overrides the text-align: center on the body element. */
margin-top: 2cm;
margin-right: auto;
margin-bottom: 2cm;
margin-left: auto;
height: 24.9cm;
top: 2cm;
vertical-align: middle;
}
.twoColLiqLtHdr #header {
background-color: #DDDDDD;
background-image: url(Background.jpg);
border-top-width: thick;
border-right-width: thick;
border-bottom-width: thick;
border-left-width: thick;
border-top-style: none;
border-right-style: none;
border-bottom-style: solid;
border-left-style: none;
border-top-color: #000;
border-right-color: #000;
border-bottom-color: #000;
border-left-color: #000;
height: 2.2cm;
width: 20.67cm;
padding-top: 0;
padding-right: 10px;
padding-bottom: 0;
padding-left: 10px;
vertical-align: bottom;
}
.twoColLiqLtHdr #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 */
left: auto;
top: auto;
right: auto;
bottom: auto;
text-align: center;
}
/* 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.
*/
.twoColLiqLtHdr #sidebar1 {
float: left;
width: 24%; /* top and bottom padding create visual space within this div */
height: 21.25cm;
padding-top: 15px;
padding-right: 0;
padding-bottom: 15px;
padding-left: 0;
border-top-width: thick;
border-right-width: thick;
border-bottom-width: thick;
border-left-width: thick;
border-top-style: none;
border-right-style: solid;
border-bottom-style: none;
border-left-style: none;
border-top-color: #000;
border-right-color: #000;
border-bottom-color: #000;
border-left-color: #000;
background-image: url(Background.jpg);
}
.twoColLiqLtHdr #sidebar1 h3, .twoColLiqLtHdr #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;
background-image: url(Background.jpg);
background-repeat: repeat;
}
/* 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.
*/
.twoColLiqLtHdr #mainContent {
border: thick none #000;
margin-top: 0;
margin-right: 0;
margin-bottom: 0;
margin-left: 0cm;
background-image: url(Background---Light.jpg);
height: 22.04cm;
text-align: left;
padding-left: 1cm;
}
.twoColLiqLtHdr #footer {
font-family: "Times New Roman", Times, serif;
background-color: #DDDDDD;
background-image: url(Background.jpg);
font-size: 10pt;
border-top-width: thick;
border-right-width: thick;
border-bottom-width: thick;
border-left-width: thick;
border-top-style: solid;
border-right-style: none;
border-bottom-style: none;
border-left-style: none;
border-top-color: #000;
border-right-color: #000;
border-bottom-color: #000;
border-left-color: #000;
width: 21.2cm;
height: auto;
padding: 0;
}
.twoColLiqLtHdr #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;
border: medium solid #000;
background-image: url(Background---Light.jpg);
}
.twoColLiqLtHdr #container #mainContent p {
font-family: "Times New Roman", Times, serif;
}
-->
</style><!--[if IE]>
<style type="text/css">
/* place css fixes for all versions of IE in this conditional comment */
.twoColLiqLtHdr #sidebar1 { padding-top: 30px; }
.twoColLiqLtHdr #mainContent { zoom: 1; padding-top: 15px; }
/* the above proprietary zoom property gives IE the hasLayout it needs to avoid several bugs */
</style>
<![endif]-->
<script src="SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
<link href="SpryAssets/SpryMenuBarVertical.css" rel="stylesheet" type="text/css" />
</head>
<body class="twoColLiqLtHdr">
<div id="container">
<div id="header">
<h1 align="center"><img src="Poodle-Right.gif" width="63" height="63" align="middle" /><img src="Pykasso-Logo.gif" width="585" height="39" align="middle" />
<img src="Poodle-Left.gif" width="63" height="63" align="absmiddle" />
<!-- end #header -->
</h1></div>
<div id="sidebar1">
<div align="left">
<ul id="MenuBar1" class="MenuBarVertical">
<li><a href="#"><strong><img src="Home - Small.gif" width="156" height="27" border="0" align="middle" usemap="#Map2" />
<map name="Map2" id="Map2">
<area shape="poly" coords="52,18" href="#" />
</map>
</strong></a> </li>
<li><a href="#"><strong><img src="About-Pykasso - Small.gif" width="156" height="27" border="0" align="middle" usemap="#Map3" />
<map name="Map3" id="Map3">
<area shape="poly" coords="62,13" href="#" />
</map>
</strong></a></li>
<li><a href="#"><img src="Pooch-Parlour - Small.gif" width="156" height="27" border="0" align="middle" usemap="#Map4" />
<map name="Map4" id="Map4">
<area shape="poly" coords="69,12" href="#" />
</map>
</a> </li>
<li><a href="#"><strong><img src="Pet-Products - Small.gif" width="156" height="27" border="0" align="middle" usemap="#Map5" />
<map name="Map5" id="Map5">
<area shape="poly" coords="61,21" href="#" />
</map>
</strong></a> </li>
<li><a href="#"><strong><img src="Poodles - Small.gif" width="156" height="27" border="0" align="middle" usemap="#Map6" />
<map name="Map6" id="Map6">
<area shape="poly" coords="49,24" href="#" />
</map>
</strong></a></li>
<li><a href="#"><strong><img src="Policies - Small.gif" width="156" height="27" border="0" align="middle" usemap="#Map8" />
<map name="Map8" id="Map8">
<area shape="poly" coords="52,18" href="#" />
</map>
</strong></a></li>
<li><a href="#"><strong><img src="Newsletters - Small.gif" width="156" height="27" border="0" align="middle" usemap="#Map7" />
<map name="Map7" id="Map7">
<area shape="poly" coords="68,16" href="#" />
</map>
</strong></a>
</li>
<li><a href="#"><strong><img src="Contact-Pykasso - Small.gif" width="156" height="27" border="0" align="middle" usemap="#Map" />
<map name="Map" id="Map">
<area shape="poly" coords="107,14" href="#" />
</map>
</strong></a></li>
</ul>
</div>
</div>
<div id="mainContent">
<h2>Welcome</h2>
<p>&nbsp;</p>
</div>
<div id="footer">
<div align="center"> About Pykasso <strong>ǀ</strong> Contact Pykasso <strong>ǀ</strong> Privacy Policy</div>
</div>
<!-- end #container --></div>
<script type="text/javascript">
<!--
var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
//-->
</script>
</body>
</html>

edbr
06-11-2009, 09:46 AM
first regarding the image in the footer use background-repeat: it shoud be either x or y depending on your image.

scottcom4
06-12-2009, 05:50 AM
first regarding the image in the footer use background-repeat: it shoud be either x or y depending on your image.
Ok I will rectify that. Should I repost my code once this has been completed, if the result is still not favourable?

edbr
06-12-2009, 06:26 AM
no unless you change it drastically.
also re text indent try setting to px not cm

scottcom4
06-12-2009, 08:59 AM
no unless you change it drastically.
also re text indent try setting to px not cm
Hi Edbr,

I have used the px instead of cm and have used repeat for the backgrounds, however I still have the same problems.

Could Iimpose on you further and ask for more help please?

Thanks mate.:mrgreen: