|
|||||||
| CSS Discussion and technical support relating to Cascading Style Sheets. |
![]() |
|
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
can't place footer
Hi,
I can't insert a footer using a div id at bottom of the page. The page length is unknown and i want to just fit it in under the last thing printed. I have a nav bar to the left and heading. The main content area has items floated to the right. I have standard 3 main areas beofre the footer. I add a footer and it appears as part of the main content area to the left on the same line as main content area. The footer appears to the left of this but it isnt in the div. div#contentinfo { position:relative; top:10px; /*border adds 2 px so i take them off*/ left: 10px; width:150px; height:220px; z-index:2; border:3px groove #666862; float:right; margin-right:30px; // background: white; background-image: url('camback.jpg') ; } last thing I add is </div> <br><br> <div id="footer"> asdsa </div> </body> </html> |
|
#2
|
||||
|
||||
|
Well you've got both a position and a float in the contentinfo and there's no indication the footer has a clear:both on it. Post a link.
__________________
Help Save Ana Why use Web Standards: Zeldman How (new): Castro How (experienced): Cederholm If you can only get one book and you're already HTML savvy then this is it: stylin' with CSS: A Designer's Guide Charles Wyke-Smith New Riders "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." Brian W. Kernighan |
|
#3
|
||||
|
||||
|
You can also reduce this:
background: white; background-image: url('camback.jpg') ; to just: background: white url('camback.jpg') ; saves some typing, easier to read/edit later, smaller code.
__________________
Help Save Ana My Portal: I Build WebPagesPricing? Read:http://www.webdeveloper.com/forum/pricing_faq.html AUP: http://www.jupitermedia.com/corporate/privacy/aup.html I test with: Firefox, Mozilla, Opera, Safari-on-XP, Google Chrome, SeaMonkey Internet.com freelancers |
|
#4
|
|||
|
|||
|
I can't get a footer after at bottom of the page. The problem is my maincontent area is dynamic in size although i have edited this out.
The footer appears to the left of maincontent and not at bottom. Code:
...
div#headerWrapper {
position:absolute;
top:5px;
left: 5px;
background: #63625e ;
width:1000px;
height:120px;
top:3px;
left: 5px;
border:2px groove black;
}
div#header {
position:relative;
top:5px;
left: 5px;
width:990px;
height:100px;
background: black;
border:5px groove #63625e ;
}
div#boxlayer1 {
position:absolute;
width:145px;
height:700px;
z-index:1;
left: 5px;
top: 125px;
border:2px groove black;
// background: green;
background-color:#63625e;
}
div#content1 {
position:absolute;
top:125px; /*border adds 2 px so i take them off*/
left: 165px;
width:850px;
height:900px;
z-index:1;
border:5px groove #666862;
background: black;
}
#footer {
clear:both;
float:none;
width:200px;
height:100px;
background: red;
border:5px groove #63625e ;
}
.....
</head>
<body bgcolor="#666862"> <?php include("navigation2.php"); ?>
<div id="navlist">
<div id="headnavlist">Site Features</div>
<ul >
<li ><a href='login.php'>Upload</a></li>
<li><a href='home.php'>Home</a></li>
<li ><a href='login.php'>Send Mesage</a></li>
<li><a href='home.php'>Message Outbox</a></li>
<li ><a href='login.php'>Upload</a></li>
<li><a href='home.php'>Home</a></li>
<li><a href='home.php'>Message Outbox</a></li>
</ul>
</div>
</div>
<div id="content1" >
asfafas
</div> <br><br>
<div id="footer">
asdsa
</div>
</body>
</html>
|
|
#5
|
||||
|
||||
|
Could we see your complete code (HTML & CSS)? Using your provided sample, I could reconstruct what I think you have, -but if it isn't, the advice may not apply.
Also, -the white-space inside of the tag might not be such a good thing: Quote:
__________________
Help Save Ana My Portal: I Build WebPagesPricing? Read:http://www.webdeveloper.com/forum/pricing_faq.html AUP: http://www.jupitermedia.com/corporate/privacy/aup.html I test with: Firefox, Mozilla, Opera, Safari-on-XP, Google Chrome, SeaMonkey Internet.com freelancers |
|
#6
|
||||
|
||||
|
The absolute positioning is just adding to your woes, too. Try to rebuild it with floats.
__________________
Help Save Ana Why use Web Standards: Zeldman How (new): Castro How (experienced): Cederholm If you can only get one book and you're already HTML savvy then this is it: stylin' with CSS: A Designer's Guide Charles Wyke-Smith New Riders "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." Brian W. Kernighan |
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|