http://n00bp00ns.frihost.net/project/index.html
How do I force the footer to be at the bottom of the broswer
?
Using CSS or not.
How do I force the footer to be at the bottom of the broswer
Using CSS or not.
| Code: |
| (inside footer in the css)
position:fixed; left:0; right:0; bottom:0; top:auto; |
| BlackSkad wrote: |
| Tables are not ment for layout stuff. You need to use them for tabular-data, not for making up your design.... |
| xorcist wrote: |
| Wow people sure know how to spam boards. Can I use that layout that you have there? |
| BlackSkad wrote: |
| Tables are not ment for layout stuff. You need to use them for tabular-data, not for making up your design.
The trick Mathiaus gave you is a good one, I use such kind of tricks myself and they work |
| Code: |
|
<?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Find a Header/Footer Layout That Works</title> <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type"></meta> <link rel="stylesheet" href="style/default.css" type="text/css"></link> </head> <body> <div class="page"> <div class="header"> <img src="images/title.gif" alt="Isaan Imports"/> </div> <div class="nav-bar"> <a class="baritem" href="index.html">Home Page</a> <a class="baritem" href="somescript.php">another page</a> <a class="baritem" href="info.php">Information</a> <a class="baritem" href="checkout.php?phpsessid=">Buy some stuff</a> <a class="baritem" href="photos.php">Pictures of Stuff</a> <a class="baritem" href="about.php">Contact Us</a> </div> <div class="body-text"> Get something in here.<br/> Actually get alot in here so that it over-fills the page.<br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> That Oughta do it<br/> </div> <div class="footer"> Some Kind of footer, this will do for testing. </div> </div> </body> </html> |
| Code: |
|
html, body /*this should work instead of a <div class="page"> we can try each or both*/ { margin: 0; padding: 0; width: 100% height: 100%; } body { font-weight: 400; font-size: 12pt; line-height: 14pt; font-family: helvetica, sans-serif; font-variant: normal; font-style: normal; background-color: #ffffff; color: #000000; } .page { margin: 0; padding: 0; hieght: 100%; width: 100%; } .header { position: fixed; /* let's shoot for a real header/footer type config*/ right: 0px; left: 0px; top: 0px; display: block; z-index: 2; height: 100px; text-align: center; } .nav-bar { position: fixed; top: 100px; right: 0px; left: 0px; height: 2em; border-style: solid; border-width: 1px; white-space: nowrap; padding-right: 1em; padding-left: 1em; text-align: center; background-color: #000000; color: #ffffff; z-index: 3; } .baritem { line-height: 24pt; padding: 0em 1em; } .body-text { position: absolute; padding: 0; top: 150px; right: 10%; left: 10%; z-index: 2; } .heading { text-align: center; font-size: 18pt; z-index: 3; } .footer { bottom: 0px; width: 100%; position: fixed; height: 14pt; font-size: 10pt; text-align: center; background-color: #000000; color: #ffffff; z-index: 3; } |