There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Tag Cloud
acer black screen blue screen blue screen of death boot computer connection crash css dell display driver drivers email error excel explorer firefox firefox 3 game hard drive internet internet explorer itunes laptop linux malware monitor network networking outlook outlook 2003 outlook express partition password printer problem router slow software sound sprtcmd.exe startup trojan usb virus vista windows windows xp wireless
Web Design & Development
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Internet & Networking > Web Design & Development >
div tags overlapping


HELLO AND WELCOME! Before you can post your question, you'll have to register -- it's completely free! Click here to join today! We highly recommend that you print a copy of our Guide for New Members. Enjoy!

Closed Thread
 
Thread Tools
nev02's Avatar
Junior Member with 25 posts.
 
Join Date: Oct 2007
15-Oct-2007, 11:32 AM #1
div tags overlapping
hi there!

just wondering if anyone can help

i'm trying to make a template with CSS. one annoying problem is that the editable region in the middle of the header and footer overlaps the footer when i enter in information. is there a way to push the footer tag down as the editable regions height is increased ?

if anyone can help that would be great cheers!
Fyzbo's Avatar
Senior Member with 1,777 posts.
 
Join Date: Feb 2002
Location: North Carolina, USA
Experience: Programming-Advanced|EVER
15-Oct-2007, 12:10 PM #2
It would be very helpful to see the code for your website. Is it published somewhere? By default divs will be listed one after another from the top down. The overlapping must relate to one of the styles, but I can't be sure without the code.
nev02's Avatar
Junior Member with 25 posts.
 
Join Date: Oct 2007
15-Oct-2007, 12:26 PM #3
sorry i'm new to this forum thing never done one b4 my boss recommended it to me as i'm a beginner. anyway here's the code

<!-- TemplateEndEditable --><!-- TemplateBeginEditable name="head" --><!-- TemplateEndEditable -->
<style type="text/css">
<!--
-->
</style>
<link href="../newstyle.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script>
<style type="text/css">
<!--
-->
</style>
</head>

<body>
<div class="clearfix" id="wrapper">
<div id="header"><img src="../images/header_menu.jpg" width="770" height="34" border="0" usemap="#Map" />
<map name="Map" id="Map"><area shape="rect" coords="18,9,202,27" href="#" alt="verandahs" />
<area shape="rect" coords="238,11,374,27" href="#" alt="gazebos" />
<area shape="rect" coords="416,9,552,27" href="#" alt="porches" />
<area shape="rect" coords="590,9,758,27" href="#" alt="walkways" />
</map></div>
<div id="headergraphic"><img src="../images/header_image.jpg" alt="header graphic" width="770" height="308" border="0" usemap="#Map3" />
<map name="Map3" id="Map3"><area shape="rect" coords="282,78,326,96" href="#" alt="home " />
<area shape="rect" coords="280,102,340,122" href="#" alt="gallery" />
<area shape="rect" coords="282,126,356,140" href="#" alt="technical" />
<area shape="rect" coords="278,148,330,166" href="#" alt="quote" />
<area shape="rect" coords="282,170,366,186" href="#" alt="contact us " />
</map></div>
<div id="menu"><img src="../images/footer_menu.jpg" width="770" height="33" border="0" usemap="#Map2" />
<map name="Map2" id="Map2"><area shape="rect" coords="20,7,156,27" href="#" alt="pergolas" />
<area shape="rect" coords="234,7,510,27" href="#" alt="smoking shelters" />
<area shape="rect" coords="604,7,750,27" href="#" alt="car ports" />
</map></div>
<div id="content"><!-- TemplateBeginEditable name="content2" -->
<p>&nbsp;</p>
<p>&nbsp;</p>
<!-- TemplateEndEditable --></div>
<div id="infobar">
<table class="footer" width="770" height="59" border="0" cellpadding="5" cellspacing="0">
<tr>
<td width="712"><div align="right">
<p>home . gallery . quote . contact us<br />
&copy; the past re-cast ltd<br />
site by: michaelassociates</p>
</div></td>
<td width="58"><div align="center"><img src="../images/footer_image.jpg" width="55" height="40" /></div></td>
</tr>
</table>
</div>
</div>
</body>
</html>

CSS

@charset "utf-8";

body { background-image: url(images/background_grey.jpg); background-repeat:repeat-y; background-position:center;}

#wrapper {
position:relative;
width:770px;
height: 100%;
z-index:1;
margin: auto;
top: -15px;
background-image: url(images/background_grey.jpg);
background-repeat: repeat-y;
}
#header {
position:absolute;
left:0px;
top:-1px;
width:770px;
height:37px;
z-index:1;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 24px;
background-color: #690169;
text-align: center;
padding-top: 5px;
visibility: visible;
}
#headergraphic {
position:absolute;
left:0px;
top:41px;
width:770px;
height:75px;
z-index:2;
visibility: visible;
}
#menu {
position:absolute;
left:0px;
top:511px;
width:770px;
height:42px;
z-index:3;
font-family: Arial, Helvetica, sans-serif;
font-size: 18px;
background-color: #690169;
color:#FCEFBC;
text-align: center;
padding-top: 5px;
visibility: visible;
}
#content {
position:absolute;
left:0px;
top:351px;
width:770px;
height:500px;
z-index:5;
background-color: #FFFFD9;
height:160px;
max-width:770px;
visibility: visible;
clear:both;
}
#infobar {
position:absolute;
left:0px;
top:569px;
width:770px;
height:56px;
z-index:6;
background-color: #FFFFD9;
visibility: visible;
}
a:link {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
color: #333333;
font-weight: bold;
text-decoration: none;
}
a:visited {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
color: #333333;
font-weight: bold;
text-decoration: none;
}
a:hover {
text-decoration: underline;
}

.footer {
font-family:Arial, Helvetica, sans-serif;
font-size: small;
font-weight: bolder;
position: absolute;
width: 770px;
visibility: visible;
top: -13px;
height: 45;
}
Fyzbo's Avatar
Senior Member with 1,777 posts.
 
Join Date: Feb 2002
Location: North Carolina, USA
Experience: Programming-Advanced|EVER
15-Oct-2007, 01:19 PM #4
In your css most classes have position:absolute. This tells the browser to force the content to that location regardless of what else is there. So your footer will always be in the same place no matter how long the content gets.

You can change the top: position of the footer to make sure it is below the content or what I would recommend is changing your styles so that everything is positioned relative to other items on the page.

Are you using a program or wysiwyg to generate your code?
nev02's Avatar
Junior Member with 25 posts.
 
Join Date: Oct 2007
16-Oct-2007, 04:51 AM #5
i changed the position to relative but then everything on page split up and now my content is hidden behind the header image, also the footer has come out of the wrapper even though its its within the wrapper div tags in the code.
nev02's Avatar
Junior Member with 25 posts.
 
Join Date: Oct 2007
16-Oct-2007, 07:00 AM #6
no worries i've sorted it out. thanks for yer help fyzbo. not quite the pure CSS page but not bad for a 1st time i guess once again cheers!
Fyzbo's Avatar
Senior Member with 1,777 posts.
 
Join Date: Feb 2002
Location: North Carolina, USA
Experience: Programming-Advanced|EVER
16-Oct-2007, 08:48 AM #7
I'm glad you figured it out. Web development takes a lot of time and research congrats on entering the field.
Closed Thread

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who help people like you solve computer problems. See our Welcome Guide to get started.



Thread Tools


You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 03:31 PM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.