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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CSS/DIV alignment and footer issue.

Status
Not open for further replies.

Albion

IS-IT--Management
Aug 8, 2000
517
US
Well, I decided to take everyones advice and use DIV/CSS instead of tables for my layout. After a full day of work I got everything looking good except for one thing.

Here's my code

Code:
<div id="sidepic"><img scr="..."></div>
<div id="wrap">
    <div id="header">
        ... stuff ...
    </div>
    <div id="nav">
        ... stuff ...
    </div>
    <div id="main">
        ... stuff ...
    </div>
    <div id="footersep"></div>
    <div id="footer">
        ... Stuff ...
    </div>
</div>

Here's my CSS
Code:
body,
html {
	margin: 0;
	padding: 0;
	background: #17467b;
	color: #17467b;
	font: Bold 10pt Verdana;
	text-align: justify;	
	}
body {
	min-width: 750px;
	}

#wrap {
	background: #2674d2;
	margin: 0 50px 0 50px;
	}
#sidepic {
	position: fixed;
	top: 0;
	left: 0;
	}
	
#header {
	background: #FFFFFF;
	background-image:url(Images/Background.gif);
	font: bold 7pt Times;
	color: black;	
	}
#nav {
	background: #17467b;
	}
#main {
	background: #FFFFFF;
	background-image:url(Images/Background.gif);
	height: 100%;
	}
#footersep {
	background: #17467b;
	height: 10px;
	}
#footer {
	background: #FFFFFF;
	background-image:url(Images/Background.gif);
	font: bold 7pt Times;
	color: black;
	position: relative;
	bottom: 0;
	clear: both;
	}

Right now if the main division is really small the footer divisions snug right up to the bottom of main division leaving a large area of background color underneith. I want the main division to stretch to fit the entire screen leaving the footer at the bottom of the screen unless the main division is larger then the entire screen then the footer division goes to the bottom of the main division.

Can anyone help?

Thanks

-CT
 
Some great articles have appeared that deal with multiple column layouts and how they work at extremes...


I'm sure the answer is in there... these are excellent articles.

Cheers,
Jeff

[tt]Jeff's Page @ Code Couch
[/tt]

What is Javascript? FAQ216-6094
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top