Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CSS Layout Help, Footer positioning 1

Status
Not open for further replies.

fillup07

Vendor
Apr 1, 2002
62
US
On, you can see that I am trying to get my footer to position properly. I have been playing around with it a lot but just can't get it to work.

I do not want to go to a table design.

When the page height does not require a scrollbar (like on the Login page), I want the design to fill the height of the screen (like the menu does already), and I want the footer to display at the bottom (without a scrollbar needed if the content doesn't require one).

What should the CSS be on the footer?

Any help is appreciated. Thanks -Phil
fillup07@hotmail.com
If my post was helpful, please give me a star!
 
Hi Phil,
I changed more than just the footer to make this work, but it seems to work. You can do a compare files to see exactly what.

<?xml version=&quot;1.0&quot; encoding=&quot;iso-8859-1&quot;?>
<!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;<html xmlns=&quot; xml:lang=&quot;en&quot; lang=&quot;en&quot;>
<head>
<title>System Components Corporation</title>
<meta name=&quot;author&quot; content=&quot;Phil Freo&quot; />
<meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=iso-8859-1&quot; />
<meta http-equiv=&quot;content-language&quot; content=&quot;en&quot; />
<meta http-equiv=&quot;pics-label&quot; content='(pics-1.1 &quot; comment &quot;ICRAonline v2.0&quot; l gen true for &quot; r (nz 1 vz 1 lz 1 oz 1 cz 1) &quot; l gen true for &quot; r (n 0 s 0 v 0 l 0))' />
<style type=&quot;text/css&quot;>
body {
background-color:#FFF;
height:100%;
color: #000000;
font-family: Verdana;
font-size: 10pt;
margin: 0px;
width: 100%;
}
form, td, tr, p
{
color: #000000;
font-family: Arial;
font-size: 10pt;
}
h1 {
color: #FF9900;
font-family: 'Century Gothic';
font-size: 22pt;
}
h2 {
color: #000000;
font-size: 16pt;
font-family: 'Century Gothic';
}
a:link, a:active, a:visited
{
color: blue;
font-size: 10pt;
text-decoration: none;
}
a:hover {
color: blue;
font-size: 10pt;
text-decoration: underline;
}
div#header
{
position:absolute;
width: 100%;
height: 102px;
z-index: 10;
background-image: url('/images/middlestretch.jpg');
}
img#topleft
{
position:absolute;
top: 0px;
left: 0px;
}
img#topright
{
position: absolute;
right: 0px;
top: 0px;
z-index: -1;
}
div#menu
{
position: absolute;
top: 0px;
left: 0px;
border-left:0px;
border-right:1px dotted blue;
border-top:1px solid #ccccff;
border-bottom:1px dotted blue;
background-color: #90BADE;
position: absolute;
width: 150px;
height: 100%;
float: left;
padding: 112px 10px 0px 0px;
text-align: right;
margin-top: 0;
margin-bottom: 0;
font: 10pt Verdana, sans-serif;
}
div#menu a {
color: white;
text-decoration: none;
}
div#menu a:hover {
color: white;
text-decoration: underline;
}
div#main {
width:100%;
position: absolute;
top: 0px;
left: 0px;
padding: 110px 0px 0px 150px;
height: 100%
}
div#footer
{
width: 100%;
height: 20px;
z-index: 15;
text-align: right;
font: 10pt Verdana, sans-serif;
background-color: #D7D7D7;
position:absolute;
bottom:0;
}
div#content
{
padding: 0px 10px 10px 20px;
}
.invisible
{
visibility:hidden;
}
input.addrecordtext
{
width: 200px;
}
td.addrecordcelldes
{
width: 320px;
}
td.addrecordcellinput
{
width: 215px;
}
td.maxchars
{
width: 50px;
}
select.addrecordlist
{
width: 200px;
}
tr.rowtwo
{
background-color: white;
}
tr.rowone
{
background-color: #EEEEEE;
}
th {
background-color: #FFFFCC;
font-family: Arial;
}
.datatable
{
border: 0px none;
padding: 2px;
width: 95%
}
.noborder
{
border-collapse: collapse;
padding: 0;
}
</style>
<script language=&quot;JavaScript&quot; src=&quot;/include/functions.js&quot; type=&quot;text/JavaScript&quot;></script>
</head>
<body>


<a name=&quot;top&quot;></a>

<div id=&quot;header&quot;>
<a href=&quot;/&quot;><img id=&quot;topleft&quot; src=&quot;images/topleft.jpg&quot; width=&quot;368&quot; height=&quot;102&quot; border=&quot;0&quot; alt=&quot;Home&quot; /></a>
<img id=&quot;topright&quot; src=&quot;images/topright.jpg&quot; width=&quot;385&quot; height=&quot;102&quot; alt=&quot;&quot; />
</div>

<div id=&quot;main&quot;>
<div id=&quot;menu&quot;>
<a href=&quot;/&quot;>Home</a><br />
<a href=&quot;/contact.asp&quot;>Contact Us</a><br />
<a href=&quot;/login.asp&quot;>Login</a><br /><br />
</div>
<div id=&quot;content&quot;>
<h2>Web-enabled Equipment Asset Management for your Power Plant</h2>
<div align=&quot;left&quot;>
<table class=&quot;noborder&quot;>
<tr>
<td>
<img border=&quot;0&quot; src=&quot;/images/orangearrow.gif&quot; width=&quot;17&quot; height=&quot;29&quot; alt=&quot;&quot; /></td>
<td>Specializing in <b>water level, alarm, trip and control systems for boiler
drums and feedwater heaters.</b></td>
<td rowspan=&quot;3&quot;>
<img src=&quot;images/plant_ops_services.gif&quot; style=&quot;border:0px none;&quot; width=&quot;110&quot; height=&quot;106&quot; alt=&quot;&quot; /></td>
</tr>
<tr>
<td width=&quot;17&quot; height=&quot;12&quot;>
<img border=&quot;0&quot; src=&quot;/images/orangearrow.gif&quot; width=&quot;17&quot; height=&quot;29&quot; alt=&quot;&quot; /></td>
<td>Authorized, trained and supported by the world's leader in visual process
safety.</td>
</tr>
<tr>
<td width=&quot;25&quot; height=&quot;10&quot;>
<img border=&quot;0&quot; src=&quot;/images/orangearrow.gif&quot; width=&quot;17&quot; height=&quot;29&quot; alt=&quot;&quot; /></td>
<td>Unique customer-driven capabilities and program offerings to help you
safely maximize plant performance. </td>
</tr>
</table>
</div>
<p>For security reasons, System Components Corporation requires authentication to
this site. You will be required to enter a username and password to
<a href=&quot;/login.asp&quot;>login</a>.  If you are a new user or do not have this
information, it will be necessary to contact
<a href=&quot;mailto:rick@syscompsjax.com&quot;>Rick Story</a>.</p>
<p>Each client facility is assigned a user name and passwords for approved users.
Permissions are granted for each respective folder.</p>
<p>If you are uploading files, please send them via e-mail to <a href=&quot;mailto:rick@syscompsjax.com&quot;>Rick Story</a>.</p>

<table class=&quot;noborder&quot;>
<tr>
<td>
<img border=&quot;0&quot; src=&quot;/images/orangearrow.gif&quot; width=&quot;17&quot; height=&quot;29&quot; alt=&quot;&quot; /></td>
<td>Site Management Programs</td>
</tr>
<tr>
<td width=&quot;17&quot; height=&quot;12&quot;>
<img border=&quot;0&quot; src=&quot;/images/orangearrow.gif&quot; width=&quot;17&quot; height=&quot;29&quot; alt=&quot;&quot; /></td>
<td>Highest Quality Products</td>
</tr>
<tr>
<td width=&quot;25&quot; height=&quot;10&quot;>
<img border=&quot;0&quot; src=&quot;/images/orangearrow.gif&quot; width=&quot;17&quot; height=&quot;29&quot; alt=&quot;&quot; /></td>
<td>Standardized Service & Repair Reliability & Commitment</td>
</tr>
<tr>
<td width=&quot;25&quot; height=&quot;10&quot;>
<img border=&quot;0&quot; src=&quot;/images/orangearrow.gif&quot; width=&quot;17&quot; height=&quot;29&quot; alt=&quot;&quot; /></td>
<td>Universal Brand Compatibility</td>
</tr>
<tr>
<td width=&quot;25&quot; height=&quot;10&quot;>
<img border=&quot;0&quot; src=&quot;/images/orangearrow.gif&quot; width=&quot;17&quot; height=&quot;29&quot; alt=&quot;&quot; /></td>
<td>Multiple Industry Experience</td>
</tr>
<tr>
<td width=&quot;25&quot; height=&quot;10&quot;>
<img border=&quot;0&quot; src=&quot;/images/orangearrow.gif&quot; width=&quot;17&quot; height=&quot;29&quot; alt=&quot;&quot; /></td>
<td>Training</td>
</tr>
</table>
</div>
<div id=&quot;footer&quot;>©2002 Systems Components Corporation. All rights reserved.</div>
</div>
</body>
</html>

Rick

P.S. When the browser is less than about 75% of the screen size (1024) your images overlap. To fix that, you can make a blue image (the dark color you use for the logo). Make it 1px by 1px, then insert this right before your logo code:
<img src=&quot;stretch_image.gif&quot; width=&quot;800&quot; height=&quot;1&quot;>
Set the width to the minimum size the browser should shrink to. This will make the page scroll when that happens.
 
Made a few more changes. Didn't stretch across the menu like I originally wanted, but I like it like this better now. Thanks a lot, works great. -Phil
fillup07@hotmail.com
If my post was helpful, please give me a star!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top